一键转换——介绍我做的flash转html5工具LavaH

小李的飞刀

李杰的个人网站,手机游戏,手机页游

一键转换——介绍我做的flash转html5工具LavaH

好久没更新博客了。 自从一个多月前从超闪离职,我一直在家搞flash转html5的工具,现在已经很成熟了,可以对外公布了。 我以前搞过Lava,LavaX虚拟机,所以我把这个新作品称作LavaH……


好久没更新博客了。
自从一个多月前从超闪离职,我一直在家搞flash转html5的工具,现在已经很成熟了,可以对外公布了。
我以前搞过Lava,LavaX虚拟机,所以我把这个新作品称作LavaH。

那么有人会问,市面上有好多flash转html5工具,你的有什么特色呢?
我们以pandaRun.swf为例,先测试下市面上的转换工具
1.硕思闪客精灵
用硕思闪客精灵做好的版本:企业版。
选择:导出为html5。
很快导出完毕。然后在浏览器上运行,结果屏幕一片空白,什么也没有出来。
看看导出的文件,只有一个html和一个22k的sprite.js,根本就没有导出游戏代码,当然不能运行了。
结论:硕思闪客精灵只能导出swf文件里面的资源,无法把swf文件的as代码导出并转换为html5代码。

2.google Swiffy
Swiffy服务2015年开始启动,2016年7月已经被谷歌关闭。
而且Swiffy只支持as2,不支持as3。
用下载的Swiffy插件转换panda.swf,转换失败。因为panda.swf的代码是as3的,Swiffy无法转换。

3.Egret Conversion
白鹭引擎转换需要有源代码
把源码copy到新建的转换工程里,点转换,出来一大堆警告,比如flash.display.BitmapData没有被白鹭实现的属性getPixel,clone,lock,unlock,flash.net.SharedObject没有实现的属性setProperty,构造函数super语句不在第一行等,还有3个文件语法分析错误。
结论:白鹭引擎转换flash需要提供源码,且有大量flash的api未实现,还有些flash正常的语法不被支持。转换需要手动改写源码,以适应白鹭引擎,无法做到自动转换。

总结:目前市面上的flash转html5工具,有的只能转换swf文件里面的资源,能转换代码的要么只能转换as2,要么转换as3有不支持的语法和api,需要手动改写源代码或者转换后的代码。

那么LavaH如何呢?
1.LavaH转换flash,不需要源码,只需要一个swf文件即可。
2.LavaH不仅仅可以转换swf文件里面的资源,还可以转换swf文件里面的as3字节码(目前暂不支持as2字节码转换)。
3.LavaH转换是全自动的,不需要人工干预即可一键从swf文件转换到可以直接在浏览器运行的html5文件。
4.LavaH采用了我发明的全局图像缓存技术,可以高效的支持矢量图形渲染而维持帧率不掉。

下图是用LavaH转换好的pandaRun截图,点击图片即可运行。
pandaRun.swf
原flash文件,有兴趣的可以试试看还有什么工具能做到一键转换这个游戏。

说了这么多,LavaH就没有缺点吗?当然有。
优点要说,缺点也不能隐瞒
1.混淆过的swf文件不支持转换。
2.目前只支持as3代码,用as2编写的swf文件无法转换。
3.由于flash API的复杂性,一些功能无法实现,比如部分混合模式如BlendMode.LAYER等,极少数API不能做到与flash完全一致。

目前我的工作兴趣已转到人工智能方面,所以有意转换flash转让html5技术。
有兴趣的可以联系我,邮箱:39065627@qq.com,非诚勿扰。

博文最后更新时间:


评论

  • Tobias

    We'll need to take up references https://morrisbrown.edu/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal-pharmacy%20Com%20-%20Buy%20Celexa%20Baikal%20Pharmacy%20Com buy celexa baikal pharmacy com "Based on the results of the investigation, CSRC willseriously deal (with Everbright Securities) in accordance withthe law and make an announcement to the public in a timelymanner," a CSRC spokesman said.

  • Valentin

    How do you know each other? http://dahlonega.gov/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal%20Pharmacy%20Com%20-%20Buy%20Celexa%20Baikal%20Pharmacy buy celexa baikal pharmacy com We have spent so much of this summer talking about fake heroes and cheats. No one will ever build statues to them. But there sure is one in Brooklyn for Jackie and Pee Wee, now defaced this way, as if the great Jackie Robinson is fighting an old fight all over again.

  • Eldon

    I'd like to send this to https://cie.calpoly.edu/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal-pharmacy%20-%20Buy%20Celexa%20Baikal%20Pharmacy%20Com buy celexa baikal-pharmacy Because the Pentagon did not classify what happened as combat-related, the survivors cannot be awarded Purple Hearts, and some have been denied benefits as a result. Now lawyers are preparing civil cases after the court-martial.

  • Arthur

    I'm sorry, she's https://lib.calpoly.edu/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal-pharmacy%20Com%20-%20Buy%20Celexa%20Baikal%20Pharmacy%20Com buy celexa baikal-pharmacy com "Taking any kind of illegal or unprescribed drugs is dangerous and can have devastating consequences. I'd urge people not to take drugs of any kind and anyone who has concerns should speak with their local officers or a drug support service."

  • Barbera

    US dollars https://townofpenningtonva.gov/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal-pharmacy%20-%20Buy%20Celexa%20Baikal%20Pharmacy%20Com buy celexa baikal pharmacy com "In all my years covering the market, I have never seenanything quite like this situation," said Rick Snyder, analystwith Maxim Group. "It comes down to three things: cash flow,cash flow, cash flow. All the rest of this is just noise," hesaid. "The only strategy to have in this situation is to have noexpectations."

  • Samantha

    What do you like doing in your spare time? https://www.tcl.edu/?s=Baikal%20Online%20Pharmacy%20%E2%AD%90%20www.Pills2Sale.com%20%E2%AD%90%20Buy%20Celexa%20Baikal%20Pharmacy%20-%20Buy%20Celexa%20Baikal%20Pharmacy%20Com buy celexa baikal pharmacy Defendants can assert the right under the U.S. Constitutionnot to testify, to avoid incriminating themselves, andfrequently do in criminal cases. But experts say that in a civilcase, such as Tourre's, a jury could draw an adverse inferenceif he asserted that right.

发表评论

个人资料

姓名:李杰。
爱好:编程,慢跑。
2001年来北京发展,从事软件开发17年。
文曲星Lava语言的创造者。
Iava&LavaX跨平台语言的发明者。
Mirage引擎之父。
手机拳皇97高清版主程序。

联系我

我以前的博客

Email: 39065627@qq.com

博客统计

访问量:19418197

博文总数:14 评论总数:529024

原创14 转载0 翻译0