Home >Web Front-end >Front-end Q&A >Can swf be converted to html5?

Can swf be converted to html5?

WBOY
WBOYOriginal
2022-06-14 17:08:372693browse

swf can be converted to html5, you can use Fanvas to convert swf to html5; Fanvas is a system that converts swf to "html5 canvas" animation, consisting of a parser implemented by Actionscript and a js runtime library. , is the perfect combination of Flash and Canvas, which can perfectly convert SWF (including vectors and bitmaps) into canvas animation.

Can swf be converted to html5?

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

Can swf be converted to html5

Fanvas is a system that converts swf to html5 canvas animation. It consists of two parts: a parser implemented by Actionscript and a js runtime library.

Flash is the most mature and efficient way to make animations, but because the terminal basically does not support Flash playback, this brings a lot of trouble to the terminal animation production.

Fanvas is the perfect combination of Flash and Canvas, which can perfectly convert swf (including vectors and bitmaps) into canvas animation

Technical difficulties: Compatible with various formats of swf, mainly various A variety of vector commands and a variety of image formats;

implements an efficient html5 runtime library and independently implements technologies such as bitmap caching, automatic dirty area identification, and dirty area redrawing.

Advantages:

Tools that can convert swf into H5 animation include, in addition to Fanvas, the famous Google and Adobe products - swiffy and flashcc.

In contrast, Fanvas has the following advantages: directly converting swf files into Html5 animations (Google's swiffy and Adobe's flashcc are not supported, and both products need to be processed through fla source files);

Simplified and arranged JSON data makes the JS data file after swf conversion very small, generally 20% to 50% smaller than that exported by flashcc;

Simplified runtime library, only 35k after obfuscation, gzip Only about 10k in the end. The runtime libraries of swiffy and flashcc both exceed 100K after obfuscation;

are open source and available for secondary development by users (please keep the Fanvas wording or copyright statement).

How to use

You only need to import swf with one click, and export canvas animation js with one click after the conversion is completed.

Source code description

exporter is a swf file parser implemented in as3.0, which outputs json data after parsing;

runtime is a js runtime library, used to parse json data , converted into final canvas animation.

(Learning video sharing: css video tutorial, html video tutorial)

The above is the detailed content of Can swf be converted to html5?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn