[flexcoders] Re: app:/file.swf not being loaded into HTMLLoader (AIR)

Saturday, December 10, 2011

 

I had to wait until the load before I added it to the display list...:)

--- In flexcoders@yahoogroups.com, "mattgarland2000" <alias@...> wrote:
>
> It's not showing up.
>
> I have a simple html file in src directory (preview.html)
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
> <body>
> <div id="flashContent" height="675" width="1010">
> <object type='application/x-shockwave-flash' width='100%' height='100%' id="flash">
> <param name="movie" value="app:/main.swf"/>
> <param name="wmode" value="opaque"/>
> </object>
> </body>
> </div>
> </html>
>
> It is embedded as a string and loaded by an htmlLoader:
>
> [Embed(source="preview.html", mimeType="application/octet-stream")]
> private var previewStr:Class;
>
> var html:HTMLLoader = new HTMLLoader();
> var bytes:ByteArray = new previewStr();
> var preview:String = bytes.readUTFBytes(bytes.length)
> html.loadString(preview);
> html.height=675;
> html.width=1010;
> var wrapper:UIComponent=new UIComponent();
> wrapper.addChild(html);
> addElement(wrapper);
>
> The window appears...but without the swf. Does anyone know why?
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment