【问题标题】:Flash in Win8 Store app using JavaScript + html5使用 JavaScript + html5 在 Win8 Store 应用程序中进行 Flash
【发布时间】:2013-01-09 09:48:41
【问题描述】:

我使用 JavaScript + html5 来创建 Win8 Store 应用程序。我需要在我的应用程序中打开 .swf 文件。 Swf 文件在启动时从我们的服务器下载。启动后swf文件是本地的。我想知道是否可以在应用程序中嵌入 Flash 控件?我试过了,但它似乎不起作用......(也尝试过 iframe) 我尝试通过以下代码在 Metro IE 中打开 swf 文件:

> var file = 'flashobject.html';
>             Windows.ApplicationModel.Package.current.installedLocation.getFileAsync(file).then(function
> (file) {
>                 var options = new Windows.System.LauncherOptions();
>                 options.displayApplicationPicker = true;
> 
>                 Windows.System.Launcher.launchFileAsync(file, options).then(function (success) {
>                     if (success) {
>                         // Yay!
>                         console.log('Success');
>                     } else {
>                         // FROWN :(
>                         console.log('Failure');
>                     }
>                 });
>             });

这个HTML代码:

    <body>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
            <param name="autoplay" value="false">
            <param name="movie" value="candles_Pp.swf">
            <object class="iehide" type="application/x-shockwave-flash" data="flashobject_files/candles_.swf">
                <param name="controller" value="true">
                <param name="autoplay" value="false">   
                <param name="pluginurl" value="http://get.adobe.com/flashplayer/">          
                <a href="http://www.yourwebskills.com/files/examples/candles_Pp.swf">Your browser is not able to handle this media here so use this link to play the file in an external application </a>
            </object>
        </object>
</body>

有什么方法可以打开 swf 文件,也许有任何 api 可以在启动时将 swf 转换为 html。

【问题讨论】:

  • 我正在尝试解决同样的问题,从 3 天 2 夜开始,并阅读了很多东西,但它无法在我的 flash 上工作。因为我的闪光灯有点复杂。可能这可以将您的 Flash 转换为 HTML5 代码。一定要试试看:google.com/doubleclick/studio/swiffy

标签: javascript html flash windows-8 windows-store-apps


【解决方案1】:

用于渲染用 javascript 编写的 Win8 Store 应用程序的 IE10 模拟器不支持任何插件。您需要将您的 swf 转换为可接受的 HTML5 video 格式 (.mp4) 并使用 HTML5 video 标签播放视频。

【讨论】:

  • Swf 文件存储在服务器上,无法转换。我们可以将客户端应用程序中的 swf 文件转换为可接受的 html5 格式吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多