简体   繁体   中英

Adding SWF to HTML based AIR App

I have a little HTML based Adobe AIR project I'm playing with and I'd like to add an existing SWF to the project. Now, I can see it running via the trace/log messages coming through from the SWF, but I can't seem to call any function within the SWF. I've read that the ExternalInterface function isn't available within the Air container, which looks like the right thing to use if within a browser.

Most of the samples on the Adobe site are all HTML, or all Flex/ActionScript. Has anyone tried to pull these together successfully, either as source, or through compiled SWF?

Many thanks

Robbie

Using a compiled swf has sandboxing issues.

Maybe you can make use of LocalConnection? Here is an example .

I guess this article answers pretty completely your question :

http://www.hufkens.net/2008/09/loading-remote-swf-files-in-air/

This basically was what I needed:

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ed9.html

However, my scenario was complicated in that it turns out my SWF had an embedded SWF and I was trying to access a class within the embedded SWF. Once I tried to access a class within the wrapping SWF, it all was rosy.

Cheers

Robbie

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