views:

328

answers:

1

I need to detect if running in ADL or not, I can't seem to fine an answer that is guaranteed...I found a couple posts online that say "this might work..." Is there a reliable way to check?

Thanks.

+2  A: 

Unless I'm misunderstanding,

if (Capabilities.isDebugger)
{
    Alert.show("Debugger!");
}
else
{
    Alert.show("Not the debugger.");
}

... should be what you're looking for. (If so, my apologies! Post back and I'll adjust accordingly.)

Christian Nunciato
Richard Szalay
I have a question, if they just happen to have the debugger version of flash player installed, will that make this inaccurate, or will that not matter? Thanks!!
John Isaacks
It won't matter; AIR has its own runtime. (I have the debug player installed myself, and verified this example worked before posting it just to be sure.)
Christian Nunciato
Great, thank you!
John Isaacks
Capabilities.playerType will only return "Desktop" while running in AIR/ADL.
Richard Szalay