How to check if a SWF is running as an AIR app?

Posted by Sandro on Stack Overflow See other posts from Stack Overflow or by Sandro
Published on 2010-04-08T17:03:44Z Indexed on 2010/04/08 17:13 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

Hi,

I'm wondering if there is a way for a SWF to check at runtime whether it is running as an online SWF or an AIR app? I need to use the same SWF to run both online and locally, however when running as an AIR app, external assets are located in a different directory. I'd like to check whether a SWF is local or online so I can change the source path for external assets accordingly.

Thanks, Sandro

Edit: I just realized this might be a dumb question. :) I may just use flashvars to tell the SWF that it is running within an AIR app.

© Stack Overflow or respective owner

Related posts about flash

Related posts about as3