Method and device for converting swf into canvas animation
An animation and dynamic element technology, applied in the field of network applications, can solve the problems of consuming a long download time and low playback fluency, and achieve the effects of improving playback fluency, reducing data size, and simplifying processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2020-06-16
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
Technical field
[0001] The invention relates to network application technology, in particular to a method and device for converting SWF into Canvas animation. Background technique
[0002] SWF (Shock Wave Flash) is a special format for animation design software Flash. It is an animation file format that supports vector and bitmap graphics. It is widely used in web design, animation production and other fields. SWF files are usually referred to as Flash files. .
[0003] Canvas animation is an animation drawn on HTML5 (Hyper Text Mark-up Language) web pages using canvas elements. HTML5 is the core language of the World Wide Web, the fifth major revision of Hypertext Markup Language under the standard universal markup language.
[0004] The traditional methods of converting SWF into HTML5 animation are Swiffy and Flashcc. Among them, swiffy analyzes the bytecode of the SWF file, analyzes the information of each frame in the animation, and outputs the information in the form of json ...
Examples
Embodiment Construction
[0024] In order to make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0025] figure 1 It is a flowchart of a method for converting SWF into Canvas animation in an embodiment. Such as figure 1 As shown, the method of converting SWF into Canvas animation includes the following steps:
[0026] Step 102: Analyze the SWF file, traverse the SWF file to obtain a component, which includes movie clips and graphics, and store the component definition in the component pool.
[0027] Specifically, the SWF file is composed of movie clips, graphics, and buttons. The uppermost component in a SWF is a movie clip, which is a container that can contain sub movie clips, sub graphic...