简体   繁体   中英

How to display flash swf file in HTML component in Air application?

I create a splash screen in adobe flash professional CS5. I published my swf and html wrapper. when I run html wrapper directly it display the splash screen in web browser. I create a HTML control in Adobe Air using flex builder 4.5. I put the swf and html wrapper in assets folder in air application. when I run Air application, it displays nothing. if I create a dummy html page and reference it in Air application it worked fine. How can I solve this problem, so that HTML control display my splash screen swf file.Thanks

The only reason you should need the 'wrapper' html is to display a .swf inside a web browser. As you are developing an Air application, you may load your .swf directly to the Air app using a ModuleLoader.

<?xml version="1.0"?> 
<!-- modules/MySimplestModuleLoader.mxml --> 
<s:Application xmlns:fx="ns.adobe.com/mxml/2009"; xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/mx"> 
    <s:ModuleLoader url="MyOther.swf"/>   
</s:Application>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM