在Android 5+解决方法中打开.swf文件 [英] Open .swf file in Android 5+ workarounds

查看:296
本文介绍了在Android 5+解决方法中打开.swf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在android应用api 21+中打开.swf文件.我已经知道了:

I need to open .swf files in an android app api 21+. I already know that:

  1. 多年前,Adobe停止了对Android设备上的Flash的支持
  2. 如果仍然需要打开.swf文件,则必须创建一个Adobe Air应用程序. (但就我而言,我已经拥有非常庞大的应用程序 无法用其他语言重新创建)
  3. 有(某处)名为geckoview的mozilla库
  1. Adobe stopped support for flash on android devices years ago
  2. If you still need to open .swf files you have to create an Adobe Air application. (but in my case I already have very big application which cannot be recreated in other language)
  3. There is (somewhere) mozilla lib called geckoview

一些事实:

  1. 我真的需要打开Flash文件

  1. I really need to open flash files

我无法降级api级别

所以我的问题是:是否有某种变通办法或方法来播放swf?例如,以某种方式解析它,以其他格式保存文件,使用opengl,或者可能有一些我不知道的库? 默认的网络视图当然不起作用(因为Android不支持Flash).

So my question is: is there some kind of workarounds or ways to play swf? For example, parse it somehow, save file in some other format, use opengl, or may be there some libs I don't know about? Default web view does not work of course (because of no support of flash on android).

推荐答案

因此,这是到目前为止我自己找到的解决方案.我对他们非常满意,因此将其发布为答案. 第一个是 SWF到html5 转换器.它将您的swf转换为javascript代码,该代码可以在默认的webview中正常加载,并在Android 6 Nexus 5上进行了测试(请不要忘记网络权限,因为生成的html文件使用外部脚本).
第二个方法是使用Animate CC程序来创建动画并将其导出为webgl html5画布(类似的东西,有关更多详细信息,请参见Animate CC文档). Webgl也可以很好地在webview中加载,并再次在Android 6上进行了测试.

So here are solutions I found by myself so far. I'm pretty much satisfied with them so I post this as an answer. The first one is Swf to html5 converter. It converts your swf to javascript code which loads just fine in default webview, tested on Android 6 Nexus 5 (don't forget about network permissions, because generated html file uses external scripts).
The second one is to use Animate CC programm to create animations and export them as webgl html5 canvas (something like that, for more details please see Animate CC documentation). Webgl loads just fine in webview as well, tested on Android 6 again.

这篇关于在Android 5+解决方法中打开.swf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆