CN102902525B - A kind of method of swf files in batch amendment frame frequency - Google Patents

A kind of method of swf files in batch amendment frame frequency Download PDF

Info

Publication number
CN102902525B
CN102902525B CN201210314133.7A CN201210314133A CN102902525B CN 102902525 B CN102902525 B CN 102902525B CN 201210314133 A CN201210314133 A CN 201210314133A CN 102902525 B CN102902525 B CN 102902525B
Authority
CN
China
Prior art keywords
file
swf
former
frame frequency
swf file
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
CN201210314133.7A
Other languages
Chinese (zh)
Other versions
CN102902525A (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 CN201210314133.7A priority Critical patent/CN102902525B/en
Publication of CN102902525A publication Critical patent/CN102902525A/en
Application granted granted Critical
Publication of CN102902525B publication Critical patent/CN102902525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The method that the invention provides a kind of swf files in batch amendment frame frequency, comprises the following steps: S1, it would be desirable to the former swf files passe of amendment frame frequency is to server;S2, described server binary stream reads described former swf file;S3, described server resolves the file header of described former swf file, judges whether described former swf file is compressed file according to the file header of the described former swf file resolved, if it is, decompress described former swf file, performs S4;If it is not, directly perform S4;S4, resolves described former swf file frame frequency number, replaces the frame frequency number of described former swf file with new frame frequency number batch;S5, the swf file after replacing frame frequency re-compresses and is saved in local directory.The present invention, by allowing user to needing the swf file revising frame frequency to carry out batch processing amendment frame frequency operation, improves efficiency and reduces intractability, reaching purpose quick, easy.

Description

A kind of method of swf files in batch amendment frame frequency
Technical field
The present invention relates to video display arts field, particularly relate to the method and device of a kind of swf files in batch amendment frame frequency.
Background technology
Frame frequency refers to the broadcasting speed of swf file, with the frame number of broadcasting per second for tolerance.Swf file is the professional format of Flash, is the Animation File Format of a kind of support vector and dot pattern, is widely used in the fields such as webpage design, cartoon making, and swf file is also generally referred to as Flash file.At present to swf file modification frame frequency mainly by following two method:
1. use software single amendment swf file frame frequency, as used ASV software, ASV software is the win32 application program of a swf file reverse compiling, the action script inside swf file can be checked by ASV software function, the original documents such as bitmap, audio frequency, video, font can be extracted, the inside structure of swf file can be browsed, the FLA file of swf file can be rebuild, the original resource file of derivation swf file and a JSFL order such that it is able to single swf file frame frequency is modified;
2. frame frequency directly revised by pair swf file oneself write.
In sum, the method operation complexity of prior art amendment swf file frame frequency, inefficient.
Summary of the invention
It is an object of the invention to design the method and device of a kind of swf files in batch amendment frame frequency, operating efficiency can be improved with batch modification swf file frame frequency.
To achieve these goals, the technical solution used in the present invention is as follows:
A kind of method of swf files in batch amendment frame frequency, including:
S1, it would be desirable to the former swf files passe of amendment frame frequency is to server;
S2, described server binary stream reads described former swf file;
S3, described server resolves the file header of described former swf file, judges whether described former swf file is compressed file according to the file header of the described former swf file resolved, if it is, decompress described former swf file, performs S4;If it is not, directly perform S4;
S4, resolves described former swf file frame frequency number, replaces the frame frequency number of described former swf file with new frame frequency number batch;
S5, the swf file after replacing frame frequency re-compresses and is saved in local directory.
Preferably, the file header of described former swf file starts with three identifiers, three described identifiers be three identifiers of 0x46,0x57 and 0x53 or described be 0x46,0x57 and 0x43.
Preferably, judge whether described former swf file is compressed file, if particularly as follows: three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, being then uncompressed file described in described S3;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file.
Preferably, the frame frequency number replacing described former swf file with new frame frequency number described in described S4, particularly as follows: by resolving former swf file format, determine frame frequency position, revise frame frequency number.
Preferably, the described method determining frame frequency position specifically, calculate the position at frame frequency place by the rectangular configuration that stage width is high.
Another technical scheme of the present invention is:
A kind of device of swf files in batch amendment frame frequency, including:
Upper transmission module, is used for former swf files passe to batch server;
Described batch server, for the described former swf file received carries out the process of batch modification frame frequency, replaces the frame frequency book of former swf file, generates new swf file with new frame frequency number;
Memory module, for being saved in local directory by the new swf file generated.
Preferably, described batch server also includes:
Receiver module, for receiving the former swf file that user uploads;
Judge module, is used for judging whether described former swf file is compressed file;
Decompress file, for described judge module being judged as the described former swf file decompression of non-decompression file;
Parsing module, for resolving the form of described former swf file, generates new swf file;
Compression module, for becoming compressed file by the new swf compressing file generated.
Preferably, described receiver module receives, with binary stream form, the former swf file that user uploads.
Preferably, described judge module is used for judging whether described former swf file is compressed file, particularly as follows: judge three forms of identifier of the file header of former swf file, if three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, then it is uncompressed file;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file.
Preferably, described parsing module is for resolving the form of former swf file, particularly as follows: determine frame frequency position, revises frame frequency number.
Beneficial effects of the present invention can be summarized as follows:
The present invention, by allowing user to needing the swf file revising frame frequency to carry out batch processing amendment frame frequency operation, improves efficiency and reduces intractability, reaching purpose quick, easy.
Accompanying drawing explanation
Fig. 1 is the structural representation of the present invention;
Fig. 2 is assembly of the invention structural representation.
Detailed description of the invention
In order to make technical problem solved by the invention, technical scheme and beneficial effect clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.
Seeing Fig. 1, the method for the batch modification swf file frame frequency of the present invention specifically includes following steps:
S1, it would be desirable to the former swf files passe of amendment frame frequency is to server;
When user needs the frame frequency revising former swf, it would be desirable to amendment frame frequency former swf files passe to carrying out batch server, the frame frequency of described batch server batch modification former swf file.
S2, described batch server binary stream reads described former swf file;
Byte in binary stream is written in file or equipment according to programming form, and the form read from file or equipment according to them is read into program, data in binary stream are to deposit file according to binary-coded mode, newline need not be converted by binary stream, the speed of data stream can be accelerated, improve efficiency.
S3, described server resolves the file header of described former swf file, judges whether described former swf file is compressed file according to the file header of the described former swf file resolved, if it is, decompress described former swf file, performs S4;If it is not, directly perform S4;
The file header of described former swf file starts with three identifiers, three described identifiers be three identifiers of 0x46,0x57 and 0x53 or described be 0x46,0x57 and 0x43, if three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, then it it is uncompressed file;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file.
S4, determines described former swf file frame frequency number, replaces the frame frequency number of described former swf file with new frame frequency number batch, generates new swf file;
By resolving the file format of swf, finding the position of frame frequency, first three byte of swf file is leader will, and version number is a byte, and file size is four bytes, is calculated the position at frame frequency place by the rectangular configuration that stage width is high, revises frame frequency number.
The broadcasting width of the described a height of frame frequency of stage width and height.
S5, re-compresses described new swf file and is saved in local directory.
When user needs to play swf file, directly invoke new swf file.
The present invention, by allowing user to needing the swf file revising frame frequency to carry out batch processing amendment frame frequency operation, improves efficiency and reduces intractability, reaching purpose quick, easy.
See Fig. 2, the device of the swf files in batch amendment frame frequency of the present invention, including:
Upper transmission module, is used for former swf files passe to batch server;Described batch server, for the described former swf file received carries out the process of batch modification frame frequency, replaces the frame frequency book of former swf file, generates new swf file with new frame frequency number;Memory module, for being saved in local directory by the new swf file generated.
Wherein, described batch server also includes:
Receiver module, for receiving the former swf file that user uploads.When user needs the frame frequency revising former swf, it would be desirable to the former swf files passe of amendment frame frequency is to carrying out batch server, and the module that accepts of described batch server receives described former swf file.
Described receiver module receives, with binary stream form, the former swf file that user uploads.
Judge module, is used for judging whether described former swf file is compressed file;
Particularly as follows: judge three forms of identifier of the file header of former swf file, if three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, then it is uncompressed file;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file.
Decompress file, for described judge module being judged as the described former swf file decompression of non-decompression file;
Parsing module, for resolving the form of described former swf file, generates new swf file;
Wherein, swf file format is:
Wherein first three byte of swf file is leader will, and version number is a byte, and file size is four bytes, is calculated the position at frame frequency place by the rectangular configuration that stage width is high.
By resolving the file format of swf, find the position of frame frequency, revise frame frequency number.
The broadcasting width of the described a height of frame frequency of stage width and height.
Compression module, for the new swf compressing file generated is become compressed file, and is saved under local directory, when user needs to play swf file, directly calls the new swf file of production from local directory.
The present invention, by allowing user to needing the swf file revising frame frequency to carry out batch processing amendment frame frequency operation, improves efficiency and reduces intractability, reaching purpose quick, easy.
The present invention is described in detail with preferred embodiment above by concrete; but those skilled in the art should be understood that; the invention is not limited in embodiment described above; all within the spirit and principles in the present invention; any amendment of being made, equivalent etc., should be included within the scope of the present invention.

Claims (1)

1. the method for a swf files in batch amendment frame frequency, it is characterised in that the device of use includes:
Upper transmission module, is used for former swf files passe to batch server;
Batch server, for the described former swf file received carries out the process of batch modification frame frequency, replaces the frame frequency number of former swf file, generates new swf file with new frame frequency number;
Memory module, for being saved in local directory by the new swf file generated;
Described batch server also includes:
Receiver module, for receiving the former swf file that user uploads;
Judge module, is used for judging whether described former swf file is compressed file;
Decompress file, for described judge module being judged as the described former swf file decompression of non-decompression file;
Parsing module, for resolving the form of described former swf file, generates new swf file;
Compression module, for becoming compressed file by the new swf compressing file generated;
Described method includes:
S1, it would be desirable to the former swf files passe of amendment frame frequency is to server;
S2, described server binary stream reads described former swf file;
S3, described server resolves the file header of described former swf file, judges whether described former swf file is compressed file according to the file header of the described former swf file resolved, if it is, decompress described former swf file, performs S4;If it is not, directly perform S4;
S4, resolves described former swf file frame frequency number, replaces the frame frequency number of described former swf file with new frame frequency number batch;
S5, the swf file after replacing frame frequency re-compresses and is saved in local directory;
The file header of described former swf file starts with three identifiers, three described identifiers be three identifiers of 0x46,0x57 and 0x53 or described be 0x46,0x57 and 0x43;
Judge whether described former swf file is compressed file, if particularly as follows: three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, being then uncompressed file described in described S3;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file;
The frame frequency number replacing described former swf file with new frame frequency number described in described S4, particularly as follows: by resolving former swf file format, determine frame frequency position, revises frame frequency number;
The described method determining frame frequency position specifically, calculate the position at frame frequency place by the rectangular configuration that stage width is high;
Described receiver module receives, with binary stream form, the former swf file that user uploads;
Described judge module is used for judging whether described former swf file is compressed file, particularly as follows: judge three forms of identifier of the file header of former swf file, if three identifiers of the file header of former swf file are 0x46,0x57 and 0x53, is then uncompressed file;If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then it it is compressed file;
Described parsing module is for resolving the form of former swf file, particularly as follows: determine frame frequency position, revises frame frequency number.
CN201210314133.7A 2012-08-29 2012-08-29 A kind of method of swf files in batch amendment frame frequency Active CN102902525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210314133.7A CN102902525B (en) 2012-08-29 2012-08-29 A kind of method of swf files in batch amendment frame frequency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210314133.7A CN102902525B (en) 2012-08-29 2012-08-29 A kind of method of swf files in batch amendment frame frequency

Publications (2)

Publication Number Publication Date
CN102902525A CN102902525A (en) 2013-01-30
CN102902525B true CN102902525B (en) 2016-08-03

Family

ID=47574772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210314133.7A Active CN102902525B (en) 2012-08-29 2012-08-29 A kind of method of swf files in batch amendment frame frequency

Country Status (1)

Country Link
CN (1) CN102902525B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235733B (en) * 2013-04-22 2015-12-02 四三九九网络股份有限公司 A kind of batch resolves the method and apparatus that flash trivial games is byte code
CN103761006A (en) * 2014-01-17 2014-04-30 桂林医学院 Modifiable medical digital specimen three-dimensional demonstration system
CN106919656A (en) * 2017-01-25 2017-07-04 百度在线网络技术(北京)有限公司 The generation method and device of self-defined compressed file

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7844958B2 (en) * 2005-03-11 2010-11-30 Aptana, Inc. System and method for creating target byte code
CN102368247B (en) * 2011-09-16 2015-03-18 杭州典能科技有限公司 Method for executing SWF (Small Web Format) file on handheld terminal

Also Published As

Publication number Publication date
CN102902525A (en) 2013-01-30

Similar Documents

Publication Publication Date Title
US20140040767A1 (en) Shared digital whiteboard
CN102056099B (en) By using hand-written data to reproduce the apparatus and method of hand-written message
CN111580879A (en) Applet running method and device, electronic equipment and computer storage medium
US8001213B2 (en) Method, apparatus and computer program product for providing unrestricted content on a user terminal
CN106302103B (en) Information processing method and system and application server
CN103593196A (en) Page layout self-adaptation method and device
CN102902525B (en) A kind of method of swf files in batch amendment frame frequency
US20100299338A1 (en) Method and apparatus for providing device compatibility service
CN102841901A (en) Web page display method and device
CN101627368A (en) Computer graphics rendering
CN102323880A (en) Mobile phone application interface development method and terminal based on browser parsing mode
CN103034729A (en) Webpage drawing system and webpage drawing method
US20140095579A1 (en) System and method for increasing web site serving performance
CN104965723A (en) Application program operation method and apparatus
CN108769694B (en) Method and device for Alpha channel coding based on FPGA
CN113382083A (en) Webpage screenshot method and device
CN112487763A (en) SVG-based OFD file online display method, server side and system
US20140092084A1 (en) Webpage display method and apparatus
CN113873013B (en) Offline package reorganization method and system
CN102883232B (en) Method for adding watermarks in swf documents in batches and device thereof
KR101117165B1 (en) Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system
CN106688186A (en) Sharing initial dictionaries and huffman trees between multiple compressed blocks in LZ-based compression algorithms
KR102457261B1 (en) System for server management in middleware environment
CN104219274A (en) Drive transmission device and image forming apparatus including same
JP2018502402A (en) How to increase system firmware programming speed

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