CN101937572B - Flash synthesis method - Google Patents
Flash synthesis method Download PDFInfo
- Publication number
- CN101937572B CN101937572B CN201010282573XA CN201010282573A CN101937572B CN 101937572 B CN101937572 B CN 101937572B CN 201010282573X A CN201010282573X A CN 201010282573XA CN 201010282573 A CN201010282573 A CN 201010282573A CN 101937572 B CN101937572 B CN 101937572B
- Authority
- CN
- China
- Prior art keywords
- flash
- synthetic
- file
- mark
- resource
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001308 synthesis method Methods 0.000 title abstract 2
- 230000000694 effects Effects 0.000 claims abstract description 7
- 238000010189 synthetic method Methods 0.000 claims description 11
- 238000006073 displacement reaction Methods 0.000 claims description 3
- 230000004048 modification Effects 0.000 claims description 3
- 238000012986 modification Methods 0.000 claims description 3
- 230000002194 synthesizing effect Effects 0.000 abstract description 3
- 230000015572 biosynthetic process Effects 0.000 abstract 5
- 238000003786 synthesis reaction Methods 0.000 abstract 5
- 238000000034 method Methods 0.000 description 11
- 239000000463 material Substances 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000000875 corresponding effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 230000008521 reorganization Effects 0.000 description 1
- 239000011232 storage material Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a Flash synthesis method, which comprises the following steps: s1, downloading the Flash resources to be synthesized to the local according to the XML synthesis description file, and executing the step S2 after the downloading is finished; s2, analyzing each Flash element in the Flash resource according to the Flash file structure specification, then finding a corresponding mark in the Flash element according to the record in the XML synthesis description file aiming at each analyzed Flash element, and modifying the mark according to the required Flash effect; and S3, synthesizing the Flash element with the modified mark according to the Flash file structure specification to obtain a new Flash file. The invention improves the speed of Flash synthesis; the sequential synthesis of Flash layered component files is realized; the dynamic local synthesis of the user avatar is realized.
Description
Technical field
The present invention relates to technical field of internet application, particularly a kind of Flash synthetic method.
Background technology
Along with the Internet use more and more universal, in the product of Internet, go into sense and increase user experience for the appearance that increases the user.User's virtual image assembly unit (avatar) is widely used in website application, IM (Instant Messaging, instant messaging), the various forms of recreation.The user can pass through in system, to select different vivid assemblies, even moves and accomplish the foundation to own virtual image, and uses this image in the various application of oneself.After the user is selecting different assembly image and carrying out size, the anglec of rotation etc. on the page adjustment and preview are confirmed, generate the user and hope the vivid resource seen through system is synthetic.Therefore the synthetic ability of Flash will become one of gordian technique of avatar assembling system.
The picture assembly unit is adopted in tradition avatar assembly unit mostly; The backstage need be on the page with the Flash form be the user provide can online preview the assembly unit resource, also to supply user's download carry out the assembly unit use to this locality for the assembly picture (normally png resource) that the user provides local client to use simultaneously.This method can increase the effect that user resources download and influence represent.
Flash assembly unit (synthesizing) becomes the major technique solution that current avatar system is adopted gradually.It can reduce the consumption of user's download resource, increases the applicability of terminal platform, and improves the quality of animated show greatly.Therefore, how to realize that Flash assembly unit has neatly become a technical matters that needs to be resolved hurrily.Existing Flash assembling method need be resolved the Flash element in the process that realizes fully, so speed is slow.
Summary of the invention
The technical matters that (one) will solve
The technical matters first that the present invention will solve: how to improve the synthetic speed of Flash; It two is: how to realize synthetic in order to Flash layered component file; It three is: the dynamic this locality of how to realize user's virtual image is synthetic.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of Flash synthetic method, may further comprise the steps:
S1, according to the synthetic description document of XML Flash resource downloading that needs are synthetic to local, download accomplish after execution in step S2;
S2, each the Flash element in the Flash resource is resolved according to Flash file structure instructions; Flash element after resolving to each then; Mark corresponding in the Flash element is found in record according in the synthetic description document of XML, and Flash effect is as required revised said mark;
S3, according to the synthetic Flash element of having revised after the mark of said Flash file structure instructions, obtain new Flash file.
Wherein, before step S1, also comprise step S0: obtain the synthetic description document of said XML, described order, quantity, title and the attribute that needs synthetic Flash resource in the synthetic description document of said XML.
Wherein, said step S2 is specially: numbering and structure according to Flash file structure of putting down in writing in the Flash file structure instructions and mark are resolved each the Flash element in the Flash resource.
Wherein, the said mark of said modification is specially: size, position and the anglec of rotation of revising the Flash element.
Wherein, the Flash effect comprises the displacement and the convergent-divergent of Flash element.
Wherein, the file structure of the synthetic Flash resource of the structure of said new Flash file and original needs is the same.
(3) beneficial effect
The present invention in building-up process, use mark tag in the Flash element to point to material database (Flash element database) thus in element revise tag, but not directly carry out the copy of element, so aggregate velocity is faster; Through parsing,, can realize synthesizing in order to Flash layered component (element) file then to recombinating between the internal data to (can be different Flash release formats) Flash file; And in building-up process, can accomplish parametrization adjustment, thereby the dynamic this locality that can realize user's virtual image is synthetic to size, position and the anglec of rotation of each layer assignment component object.
Description of drawings
Fig. 1 is the process flow diagram of the method for the embodiment of the invention.
Embodiment
For making the object of the invention, content and advantage clearer, will combine accompanying drawing that embodiment of the present invention is done to describe in detail further below.
In design during synthetic method of the present invention, what consider is how correctly to resolve the Flash file and how the element among the different Flash is combined.
To correctly resolve the Flash file, just at first know the file structure (can learn) of Flash from the Flash file structure instructions (flash_fileformat_specification) of official.The Flash file is a kind of file structure based on the position compression; That is to say that unit is position rather than byte in the Flash file; Sometimes a byte possibly stored several information; Sometimes an information is striden byte, and back several the former positions that add next byte of promptly going up a byte are only a complete information.
In the Flash file, basic dtd is following:
The variable of integer type all is to represent that with the computer byte order of representation of little-endian promptly low byte is placed on the front, and high byte is put behind.
Integer type is divided into following several kinds: unsigned int; The symbol integer is arranged; (fixed-point number generally is used for supporting not have the Flash on the floating-point operation equipment fixed-point number.Simulate floating point arithmetic (in the PC performance history, generally need not use this data type) with fixed-point number); Floating number; Bit Value (bit data).In Flash, also have some senior data types, but all be to constitute similar with basic data type.
The form of Flash file is to be made up of file header and file body in general.Following table 1 provides the file structure based on the Flash of Flash8.0:
File header |
Attribute list |
Element tag |
Element tag |
... |
EndTag |
Table 1
Wherein, whether file header has identified the version of this Flash file and has been compressed; Attribute list has defined information such as the size, background colour of this Flash file; Element tag refers to form the various component identifications in this Flash file, such as ShapeDefineTag, ObjectTag etc.; EndTag is an EOF, also represents all elements tag definition so far to finish simultaneously.
Wherein, element tag just has at Flash8.0 and above version.
After having understood these structures, just can resolve to each Flash element with reference to disclosed Flash document protocol.Resolve to accomplish and just can carry out synthetic operation afterwards.
Synthetic is exactly to generate a new Flash file in fact, also must observe above-mentioned Flash file layout for newly-generated Flash file.
As shown in Figure 1, the Flash synthetic method step of the embodiment of the invention is following:
S0, obtain the synthetic description document of XML, described order, quantity, title and the attribute of synthetic resource in this document.For example:
<fashion?style=″1″sex=″0″bg=″0″>
<item?x=″0″y=″0″scale=″1″res=″pants_0.swf″/>
<item?x=″0″y=″0″scale=″1″res=″coat_0.swf″/>
<item?x=″0″y=″0″scale=″1″res=″face_0.swf″/>
<item?x=″0″y=″0″scale=″1″res=″hair_0.swf″hasBack=″hairback_0.swf″/>
</fashion>
The synthetic description document of top XML has been described the synthetic situation of an elemental user virtual image (such as a QQ show), i.e. Flash positions of elements, convergent-divergent rate and title.
S1, according to the synthetic description document of XML with each synthetic resource downloading to local, if this locality has resource just no longer to download.All resource downloading up to appointment finish.
S2, resolve, elements all among the Flash is all parsed according to the numbering and the structure of Flash file structure and mark (tag).And find corresponding tag according to the description in the synthetic description document of XML; And the attribute of change tag; In general; The attribute of mark in the PLACE_OBJECT flag sequence in the Flash file structure (PLACE_OBJECT, PLACE_OBJEC_2, PLACE_OBJECT_3) is used for information such as control position, zoom ratio; As long as it is parsed and revise corresponding property, for example according to the definition in the XML file, the parametrization of size, position and the anglec of rotation of carrying out to each assembly unit parts (Flash file) is adjusted.
S3, all resource file parsings finish and have revised after the respective attributes and just can organize new file; Get final product according to the reorganization of Flash file structure; Here be noted that; Each tag in the Flash file all has numbering, and the tag information that comes from the different resource file might be numbered repetition, therefore; When setting up new Flash file, to all tag sequence numbers be arranged again, will notice during arrangement that other tag sequence numbers to its control also will be done modify among the PLACE_OBJECT.So far, composite document is accomplished.
Can find out that by above embodiment the present invention is through resolving the Flash file and revise the tag attribute and realize that Flash is synthetic, and can realize effects such as various displacements, convergent-divergent through revising the tag attribute.This scheme is more flexible in realizing synthetic process, has also alleviated the workload of art worker when related resource is provided simultaneously greatly.When program design, adopted new program structure, the various material objects in each Flash file have been carried out arranging again, and used unified material (Flash element) storehouse, with the storage material.In building-up process, use material sign (tag) to point to material but not direct object copy in the material database, aggregate velocity is faster.
Above embodiment only is used to explain the present invention; And be not limitation of the present invention; The those of ordinary skill in relevant technologies field under the situation that does not break away from the spirit and scope of the present invention, can also be made various variations and modification; Therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (6)
1. a Flash synthetic method is characterized in that, may further comprise the steps:
S1, according to the synthetic description document of XML Flash resource downloading that needs are synthetic to local, download accomplish after execution in step S2, in the synthetic description document of said XML order, quantity, title and the attribute that needs synthetic Flash resource described;
S2, each the Flash element in the Flash resource is resolved according to Flash file structure instructions; Flash element after resolving to each then; Mark corresponding in the Flash element is found in record according in the synthetic description document of XML, and Flash effect is as required revised said mark;
S3, according to the synthetic Flash element of having revised after the mark of said Flash file structure instructions, obtain new Flash file.
2. Flash synthetic method as claimed in claim 1 is characterized in that, before step S1, also comprises step S0: obtain the synthetic description document of said XML.
3. Flash synthetic method as claimed in claim 1; It is characterized in that said step S2 is specially: numbering and structure according to Flash file structure of putting down in writing in the Flash file structure instructions and mark are resolved each the Flash element in the Flash resource.
4. Flash synthetic method as claimed in claim 1 is characterized in that, the said mark of said modification is specially: size, position and the anglec of rotation of revising the Flash element.
5. Flash synthetic method as claimed in claim 1 is characterized in that, the Flash effect comprises the displacement and the convergent-divergent of Flash element.
6. like each described Flash synthetic method of claim 1~5, it is characterized in that the file structure of the Flash resource that the structure of said new Flash file and original needs are synthetic is the same.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010282573XA CN101937572B (en) | 2010-09-14 | 2010-09-14 | Flash synthesis method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010282573XA CN101937572B (en) | 2010-09-14 | 2010-09-14 | Flash synthesis method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101937572A CN101937572A (en) | 2011-01-05 |
CN101937572B true CN101937572B (en) | 2012-04-25 |
Family
ID=43390886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010282573XA Active CN101937572B (en) | 2010-09-14 | 2010-09-14 | Flash synthesis method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101937572B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105162692B (en) * | 2015-09-16 | 2018-08-10 | 暴风集团股份有限公司 | A kind of efficient Data Serialization exchange method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100620741B1 (en) * | 2004-12-06 | 2006-09-12 | 주식회사 팬택 | Mobile communication terminal using mobile flash |
CN101499007A (en) * | 2009-03-11 | 2009-08-05 | 南京联创科技股份有限公司 | Method for implementing map outline marker based on object-oriented programming language technology |
CN101706717B (en) * | 2009-10-12 | 2012-07-04 | 南京联创科技集团股份有限公司 | Method for processing acquisition index dynamic image |
-
2010
- 2010-09-14 CN CN201010282573XA patent/CN101937572B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN101937572A (en) | 2011-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102541541B (en) | Interface creating method and device | |
JP5930497B2 (en) | Template file processing method and apparatus | |
CN108804188A (en) | Changing an interface skin method and device | |
CN105528418B (en) | A kind of design documentation generation method and device | |
CN105700925B (en) | A kind of interface implementing method and device of APP | |
US20130117656A1 (en) | Conversion of web template designs | |
CN107315580A (en) | Component processing method, device and the equipment of user interface, computer-readable recording medium | |
CN102609256A (en) | Motion chart generating method based on webpages | |
CN105511873A (en) | User interface control display method and device | |
JP2014524623A5 (en) | ||
CN105183450A (en) | E-government form model configuration system with foreground and background separation function | |
CN107122175A (en) | Interface creating method and device | |
CN114020846A (en) | Processing method and device capable of changing NFT (network File transfer) works | |
CN103412748A (en) | Display control method, device and system for user interface of embedded platform | |
CN104267966A (en) | Method and device for generating program codes of software | |
CN109558159A (en) | The update method and device of user interface in game | |
CN110969004A (en) | Automatic typesetting method and system for image and text, server and medium | |
CN104052626A (en) | Method, device and system for configuring network element data | |
CN101937572B (en) | Flash synthesis method | |
CN114721567B (en) | Desktop display method and electronic device | |
CN114741071B (en) | Application construction method and device | |
US10169901B2 (en) | Staggered animation scheduling | |
CN111522546B (en) | Page generation method, related device and front-end page | |
CN109684751A (en) | A kind of drawing call method, device, equipment and the system of assembled architecture | |
CN109614536A (en) | YouTube-based video batch crawling method, system, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080 Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd. Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd. |