CN102855316B - The method and apparatus of the polar plot of swf file layout is derived from swf file - Google Patents

The method and apparatus of the polar plot of swf file layout is derived from swf file Download PDF

Info

Publication number
CN102855316B
CN102855316B CN201210313202.2A CN201210313202A CN102855316B CN 102855316 B CN102855316 B CN 102855316B CN 201210313202 A CN201210313202 A CN 201210313202A CN 102855316 B CN102855316 B CN 102855316B
Authority
CN
China
Prior art keywords
polar plot
former
swf file
high level
label information
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
Application number
CN201210313202.2A
Other languages
Chinese (zh)
Other versions
CN102855316A (en
Inventor
张魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
4399 NETWORK Co Ltd
Original Assignee
4399 NETWORK Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 4399 NETWORK Co Ltd filed Critical 4399 NETWORK Co Ltd
Priority to CN201210313202.2A priority Critical patent/CN102855316B/en
Publication of CN102855316A publication Critical patent/CN102855316A/en
Application granted granted Critical
Publication of CN102855316B publication Critical patent/CN102855316B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a kind of method and apparatus of deriving the polar plot of swf file layout from swf file, by resolving original header, obtaining former stage width values and former stage high level; Respectively the width values of described former polar plot and the high level of described former polar plot are calculated according to preset algorithm, obtain the polar plot width values after calculating and the polar plot high level after calculating; Replace described former stage width values by the polar plot width values after described calculating, replace described former stage high level by the polar plot high level after described calculating, obtain new File header information; And then derive the polar plot of swf file layout.Adopt easy method namely can extract certain special object in Flash game picture, and the special object extracted is swf file layout, thus facilitates user to check certain special object in Flash game picture to improve the experience of user.

Description

The method and apparatus of the polar plot of swf file layout is derived from swf file
Technical field
The invention belongs to field of computer technology, be specifically related to a kind of method and apparatus of deriving the polar plot of swf file layout from swf file.
Background technology
Flash game is the new a kind of game form risen in recent years, due to its have game simple, easy to operate, green, gradually liked by numerous online friends without the need to installation and the advantage such as file size is little.
Flash game also has an outstanding feature: each game picture occurred in Flash game as smart as a new pin and vividly, visual effect is strong, especially for certain special object occurred in individual game picture, game player has the needs obtaining this special object usually, thus convenience gaming player edits this special object or carries out other operations.Such as, certain game picture is: a brown Little Bear and one exempt to run in thick grass in vain, brown Little Bear can think special object, is extracted separately by brown Little Bear picture from whole game picture, convenience gaming player can carry out various operation to brown Little Bear.
In prior art, after being extracted separately from whole game picture by certain special object, be converted into svg picture format, due to svg picture poor compatibility, cause much software all cannot open svg picture, thus inconvenient user check certain special object in Flash game picture.
Summary of the invention
For the defect that prior art exists, the invention provides a kind of method and apparatus of deriving the polar plot of swf file layout from swf file, adopt easy method namely can extract certain special object in Flash game picture, and, the special object extracted is swf file layout, thus facilitate user to check certain special object in Flash game picture to improve the experience of user.
The technical solution used in the present invention is as follows:
The invention provides a kind of method deriving the polar plot of swf file layout from swf file, comprise the following steps:
S1, reads and resolves source swf file, obtains the original header of described source swf file, original attribute tags information, the placement of former object label information, former display frame label information, former end-tag information and at least one former polar plot label information;
S2, resolves described original header further, obtains former stage width values and former stage high level;
Read the appointment former polar plot label information corresponding with the polar plot needing to derive, then resolve the former polar plot label information of described appointment, obtain the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
S3, calculates the width values of described former polar plot and the high level of described former polar plot respectively according to preset algorithm, obtains the polar plot width values after calculating and the polar plot high level after calculating;
S4, replaces described former stage width values by the polar plot width values after described calculating, replaces described former stage high level, obtain new File header information by the polar plot high level after described calculating;
The described former object of polar plot identifier write obtained by S2 is placed in label information, obtains new object and places label information;
S5, described new File header information, described original attribute tags information, described former polar plot label information, described new object are placed label information, described former display frame label information and described former end-tag information and write in order in blank swf file, obtains the polar plot of the swf file layout corresponding with described former polar plot label information.
Preferably, S3 is specially: arrange fixing multiple value, and the width values of described former polar plot and described fixing multiple value are made multiplication and calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating.
Preferably, described fixing multiple value is 0.8-1.3.
Preferably, described fixing multiple value is 1.0.
The invention provides a kind of device of deriving the polar plot of swf file layout from swf file, comprising:
Read module, for reading source swf file;
Document analysis module, source swf file for reading described read module is resolved, and obtains the original header of described source swf file, original attribute tags information, the placement of former object label information, former display frame label information, former end-tag information and at least one former polar plot label information;
File header parsing module, resolving for resolving to described document analysis module the described original header obtained, obtaining former stage width values and former stage high level;
Polar plot label parsing module, resolving for resolving to described document analysis module the described former polar plot label information obtained, obtaining the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
Computing module, the high level for the width values and described former polar plot of resolving the described former polar plot obtained to described polar plot label parsing module calculates, and obtains the polar plot width values after calculating and the polar plot high level after calculating;
Replacement module, described polar plot width values for calculating with described computing module is replaced described file header parsing module and is resolved the described former stage width values obtained, replace described file header parsing module by the described polar plot high level that described computing module calculates and resolve the described former stage high level obtained, obtain new File header information;
Object places tag update module, writing described document analysis module and resolves the described former object obtained and place in label information, obtaining new object placement label information for described polar plot label parsing module being resolved the described polar plot identifier obtained;
New polar plot generation module, for the described new File header information will obtained after described replacement module replacement, described document analysis module resolves the described original attribute tags information obtained, described document analysis module resolves the described former polar plot label information obtained, described object places the described new object placement label information that tag update module obtains, described document analysis module is resolved the described former display frame label information that obtains and described document analysis module and is resolved the described former end-tag information obtained and write in blank swf file in order, obtain the polar plot of the swf file layout corresponding with described former polar plot label information.
Preferably, described computing module also for: arrange fixing multiple value, the width values of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating.
Preferably, described fixing multiple value is 0.8-1.3.
Preferably, described fixing multiple value is 1.0.
Beneficial effect of the present invention is as follows:
Method and apparatus of deriving the polar plot of swf file layout from swf file provided by the invention, adopt easy method namely can extract certain special object in Flash game picture, and, the special object extracted is swf file layout, thus facilitate user to check certain special object in Flash game picture to improve the experience of user.
Accompanying drawing explanation
Fig. 1 is schematic flow sheet of deriving the method for the polar plot of swf file layout from swf file provided by the invention;
Fig. 2 is structural representation of deriving the device of the polar plot of swf file layout from swf file provided by the invention.
Embodiment
Below in conjunction with accompanying drawing, the method deriving the polar plot of swf file layout from swf file provided by the invention is described in detail:
As shown in Figure 1, the method deriving the polar plot of swf file layout from swf file provided by the invention, comprises the following steps:
S1, reads and resolves former swf file, obtains the original header of described source swf file, original attribute tags information, at least one former polar plot label information, the placement of former object label information, former display frame label information and former end-tag information.
Former swf file comprises multiple polar plot usually, the unique corresponding polar plot label of each polar plot.When resolving former swf file, according to actual needs, can resolve and obtain all polar plot labels, then for each polar plot label, all take method provided by the invention and finally obtain the polar plot of the swf form corresponding with each polar plot label; Also only can resolve and obtain specific polar plot label, then be obtained the polar plot of the swf form corresponding with this specific polar plot label by method provided by the invention.
As shown in table 1, the file structure table for swf file in prior art:
Table 1: the file structure table of existing swf file
As can be seen from Table 1, swf file is made up of file header and data volume; Wherein, data volume is defined by multiple different types of label and obtains.Wherein, each label can be summed up as two classes: describe label and abstract factory; Concrete, describe label for defining shape, word, sound or the bitmap etc. in swf file, each describes label and is all previously provided with corresponding role ID, and by all description tag storage in the storage space being called dictionary.Abstract factory is used for from dictionary, read each and describes label, then operates each and describes label, makes it to produce animation etc.
In the present invention, the original header of acquisition source swf file, original attribute tags information, former polar plot label information, former object is only needed to place label information, former display frame label information and former end-tag information.By obtaining four kinds of above-mentioned label informations, namely can extract individual static polar plot, there is polar plot and extract advantage simply and easily.Wherein, polar plot label (DefineShape4tag) belongs to description label, for defining the shape of certain polar plot, comprises the information such as lines and filling of shape; Object is placed label (PlaceObjecttag) and is belonged to abstract factory, for the content of vector icon signing justice is generated an example, then adds in playlist, comprises the information such as displacement and distortion; Display frame label (ShowFrametag) is for being shown to the corresponding instance in playlist above screen.End-tag (Endtag) is positioned at the ending of whole swf file, for identifying this swf end of file.
Certainly, in the process extracting polar plot, also can extract other labels simultaneously, make the polar plot extracted have other relevant natures.
S2, resolves described original header further, obtains former stage width values and former stage high level;
Read the appointment former polar plot label information corresponding with the polar plot needing to derive, then resolve the former polar plot label information of described appointment, obtain the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
S3, calculates the width values of described former polar plot and the high level of described former polar plot respectively according to preset algorithm, obtains the polar plot width values after calculating and the polar plot high level after calculating;
This step can be specially: arrange fixing multiple value, and the width values of described former polar plot and described fixing multiple value are made multiplication and calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating.Wherein, fixing multiple value is 0.8-1.3.Preferred fixing multiple value is 1.0.
S4, replaces described former stage width values by the polar plot width values after described calculating, replaces described former stage high level, obtain new File header information by the polar plot high level after described calculating;
The object of S2-S4 is: when displaying ratio is very little in the stage of former swf file for the polar plot needing to extract, such as: the stage of former swf file is 10 centimetres * 10 centimetres, and need the polar plot extracted to be 1 centimetre * 1 centimetre; So if do not change former stage width values and former stage high level, then the polar plot of final display is very little.So, in the present invention, by resetting stage width values and stage high level, the aesthetic property of the polar plot of display can be increased.
The described former object of polar plot identifier write obtained by S2 is placed in label information, obtains new object and places label information;
The unique corresponding polar plot identifier (CharacterID) of each polar plot, and this polar plot identifier pre-sets, and in the present invention, only need extract this polar plot identifier.Write by polar plot identifier in former object placement label information and obtain new object placement label, new object is placed label and is placed in playlist by polar plot identifier, by display frame label, the polar plot corresponding with polar plot identifier is shown to screen.Thus achieve the object of the polar plot of deriving swf file layout from swf file.
S5, described new File header information, described original attribute tags information, described former polar plot label information, described new object are placed label information, described former display frame label information and described former end-tag information and write in order in blank swf file, obtains the polar plot of the swf file layout corresponding with described former polar plot label information.
In the present invention, only need to reset original head and former object placement label, then certain the specific polar plot in former swf file namely can be extracted easily in conjunction with the former polar plot label in former swf file, former display frame label and former end-tag, and, the polar plot extracted very is applicable to display, so, there is the simple advantage of extracting method.
As shown in Figure 2, the present invention also provides a kind of device of deriving the polar plot of swf file layout from swf file, comprising:
Read module 21, for reading source swf file;
Document analysis module 22, source swf file for reading read module 21 is resolved, and obtains the original header of described source swf file, original attribute tags information, the placement of former object label information, former display frame label information, former end-tag information and at least one former polar plot label information;
File header parsing module 23, resolving for resolving to document analysis module 22 the described original header obtained, obtaining former stage width values and former stage high level;
Polar plot label parsing module 24, resolving for resolving to document analysis module 22 the described former polar plot label information obtained, obtaining the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
Computing module 25, the high level for the width values and described former polar plot of resolving the described former polar plot obtained to polar plot label parsing module 24 calculates, and obtains the polar plot width values after calculating and the polar plot high level after calculating;
Described computing module also for: arrange fixing multiple value, the width values of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating.Wherein, described fixing multiple value is 0.8-1.3, is preferably 1.0.
Replacement module 26, described polar plot width values alternate file header parsing module 23 for calculating with computing module 25 resolves the described former stage width values obtained, resolve by the described polar plot high level alternate file header parsing module 23 that computing module 25 calculates the described former stage high level obtained, obtain new File header information;
Object places tag update module 27, resolving in the described former object placement label information obtained, obtaining new object and placing label information for polar plot label parsing module 24 being resolved the described polar plot identifier writing in files parsing module 22 obtained;
New polar plot generation module 28, for the described new File header information obtained after replacement module 26 is replaced, document analysis module 22 resolves the described original attribute tags information obtained, document analysis module 22 resolves the described former polar plot label information obtained, object places the described new object placement label information that tag update module 27 obtains, document analysis module 22 is resolved the described former display frame label information that obtains and document analysis module 22 and is resolved the described former end-tag information obtained and write in blank swf file in order, obtain the polar plot of the swf file layout corresponding with described former polar plot label information.
In sum, method and apparatus of deriving the polar plot of swf file layout from swf file provided by the invention, adopt easy method namely can extract certain special object in Flash game picture, and, the special object extracted is swf file layout, thus facilitate user to check certain special object in Flash game picture to improve the experience of user.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.

Claims (6)

1. derive a method for the polar plot of swf file layout from swf file, it is characterized in that, comprise the following steps:
S1, reads and resolves source swf file, obtains the original header of described source swf file, original attribute tags information, the placement of former object label information, former display frame label information, former end-tag information and at least one former polar plot label information;
S2, resolves described original header further, obtains former stage width values and former stage high level;
Read the appointment former polar plot label information corresponding with the polar plot needing to derive, then resolve the former polar plot label information of described appointment, obtain the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
S3, calculates the width values of described former polar plot and the high level of described former polar plot respectively according to preset algorithm, obtains the polar plot width values after calculating and the polar plot high level after calculating; S3 is specially: arrange fixing multiple value, and the width values of described former polar plot and described fixing multiple value are made multiplication and calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating;
S4, replaces described former stage width values by the polar plot width values after described calculating, replaces described former stage high level, obtain new File header information by the polar plot high level after described calculating;
The described former object of polar plot identifier write obtained by S2 is placed in label information, obtains new object and places label information;
S5, described new File header information, described original attribute tags information, described former polar plot label information, described new object are placed label information, described former display frame label information and described former end-tag information and write in order in blank swf file, obtains the polar plot of the swf file layout corresponding with described former polar plot label information.
2. the method deriving the polar plot of swf file layout from swf file according to claim 1, it is characterized in that, described fixing multiple value is 0.8-1.3.
3. the method deriving the polar plot of swf file layout from swf file according to claim 2, it is characterized in that, described fixing multiple value is 1.0.
4. derive a device for the polar plot of swf file layout from swf file, it is characterized in that, comprising:
Read module, for reading source swf file;
Document analysis module, source swf file for reading described read module is resolved, and obtains the original header of described source swf file, original attribute tags information, the placement of former object label information, former display frame label information, former end-tag information and at least one former polar plot label information;
File header parsing module, resolving for resolving to described document analysis module the described original header obtained, obtaining former stage width values and former stage high level;
Polar plot label parsing module, resolving for resolving to described document analysis module the described former polar plot label information obtained, obtaining the width values of former polar plot, the high level of former polar plot and the polar plot identifier for the former polar plot of unique identification;
Computing module, the high level for the width values and described former polar plot of resolving the described former polar plot obtained to described polar plot label parsing module calculates, and obtains the polar plot width values after calculating and the polar plot high level after calculating; Be specially: arrange fixing multiple value, the width values of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot width values after described calculating; The high level of described former polar plot and described fixing multiple value are made multiplication and are calculated, and obtain the polar plot high level after described calculating;
Replacement module, described polar plot width values for calculating with described computing module is replaced described file header parsing module and is resolved the described former stage width values obtained, replace described file header parsing module by the described polar plot high level that described computing module calculates and resolve the described former stage high level obtained, obtain new File header information;
Object places tag update module, writing described document analysis module and resolves the described former object obtained and place in label information, obtaining new object placement label information for described polar plot label parsing module being resolved the described polar plot identifier obtained;
New polar plot generation module, for the described new File header information will obtained after described replacement module replacement, described document analysis module resolves the described original attribute tags information obtained, described document analysis module resolves the described former polar plot label information obtained, described object places the described new object placement label information that tag update module obtains, described document analysis module is resolved the described former display frame label information that obtains and described document analysis module and is resolved the described former end-tag information obtained and write in blank swf file in order, obtain the polar plot of the swf file layout corresponding with described former polar plot label information.
5. device of deriving the polar plot of swf file layout from swf file according to claim 4, it is characterized in that, described fixing multiple value is 0.8-1.3.
6. device of deriving the polar plot of swf file layout from swf file according to claim 5, it is characterized in that, described fixing multiple value is 1.0.
CN201210313202.2A 2012-08-29 2012-08-29 The method and apparatus of the polar plot of swf file layout is derived from swf file Active CN102855316B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210313202.2A CN102855316B (en) 2012-08-29 2012-08-29 The method and apparatus of the polar plot of swf file layout is derived from swf file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210313202.2A CN102855316B (en) 2012-08-29 2012-08-29 The method and apparatus of the polar plot of swf file layout is derived from swf file

Publications (2)

Publication Number Publication Date
CN102855316A CN102855316A (en) 2013-01-02
CN102855316B true CN102855316B (en) 2016-01-20

Family

ID=47401904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210313202.2A Active CN102855316B (en) 2012-08-29 2012-08-29 The method and apparatus of the polar plot of swf file layout is derived from swf file

Country Status (1)

Country Link
CN (1) CN102855316B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279456B (en) * 2013-05-09 2016-01-27 四三九九网络股份有限公司 Change the method and apparatus that swf file is sequence chart

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567970A (en) * 2003-06-25 2005-01-19 张齐治 Method for playing SWF file (FLASH) on handheld mobile equipment
CN1835572A (en) * 2006-01-24 2006-09-20 康佳集团股份有限公司 Method of realizing flash cartoon playing on DVD recorder player

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7307642B2 (en) * 2001-06-28 2007-12-11 Ideaworks 3D Ltd. Graphics compression

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567970A (en) * 2003-06-25 2005-01-19 张齐治 Method for playing SWF file (FLASH) on handheld mobile equipment
CN1835572A (en) * 2006-01-24 2006-09-20 康佳集团股份有限公司 Method of realizing flash cartoon playing on DVD recorder player

Also Published As

Publication number Publication date
CN102855316A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
CN103677516B (en) The interface creating method of terminal and device
CN102289407B (en) Method for automatically testing document format conversion
CN104699714B (en) Book version formatted file is converted to the method and device of EPUB formatted files
CN102122280B (en) Method and system for intelligently extracting content object
CN102750337B (en) Producing method and device for font
CN104461519B (en) A kind of flow chart dynamic generation and the method for control of authority
CN105786921B (en) A kind of the data module method for transformation and device of non-structured document
CN105335445A (en) Layout display method and device
CN103955549A (en) Web GIS system based on SVG and data input and search method thereof
CN102509510B (en) Interactive automatically updating method for legend content of electronic map
CN107092585A (en) Mongolian display methods and system based on scalable vector graphicses
CN110363206A (en) Cluster, data processing and the data identification method of data object
CN103324702B (en) Video file processing method and video file processing equipment
CN103136453A (en) Automatic test paper formation method and automatic scoring method of document manipulation subjects
CN102855316B (en) The method and apparatus of the polar plot of swf file layout is derived from swf file
CN103455479A (en) Method and terminal for creating contacts
CN102866985B (en) For data formatter and the method for on-line analysing processing system
CN104424214B (en) A kind of self-defined method and apparatus for extracting directory content
CN102446206B (en) A kind of cross-platform switch and method of three-dimensional data
CN102375889A (en) Method for constructing webpage through webpage construction database
CN107203525B (en) Database processing method and device
CN111597292A (en) Text formatting cleaning method based on webpage label position
CN108255895A (en) A kind of web data acquisition methods using context environmental rule
CN107958156A (en) A kind of method that vulnerability information is obtained based on template
US8719693B2 (en) Method for storing localized XML document values

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