1

I use JavaScript + html5 for create Win8 Store app. I need to open .swf file in my app. Swf file is downloading from our server on boot time. Swf file is local after boot. I wonder if it is possible to embed a flash control in a app? I tried but it seems it doesn't work... (have tried iframe too) I try to open swf file in Metro IE by this code:

> 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');
>                     }
>                 });
>             });

This Html code:

    <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>

Is there any way to open swf file, mayby there any api for convert swf to html at boot time.

4

1 回答 1

1

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

于 2013-01-09T09:50:58.913 回答