Posted by Tonic in SWF Studio V3 on Mar 17 2008, 06:45 am

Hello,

is it possible to know if an swf launched in a browser or is launched in a exe?

With an actionscript code?

Thanks :)


Posted by mbd in SWF Studio V3 on Mar 17 2008, 09:24 am

For AS1/AS2 projects use an existence check on ssCore:

if (ssCore)
{
   // You're running in SWF Studio.
}
else
{
   // You're not.
}


In AS3 you need to include the V3 API SWC, so you can use:

if (ssCore.isEXE)
{
   // You're running in SWF Studio.
}
else
{
   // You're not.
}