开发者

How can I determined if I'm within an AIR app through Actionscript?

开发者 https://www.devze.com 2023-01-20 17:33 出处:网络
I\'m seeking a method that tells me whether my code is running inside an AIR app or not. Something a lot less tacky than polling an AIR-only method. So far, searching the docs has been unfruitful.开发

I'm seeking a method that tells me whether my code is running inside an AIR app or not. Something a lot less tacky than polling an AIR-only method. So far, searching the docs has been unfruitful.开发者_如何学Python Anyone know of such a method?


As said above check playerType within Capabilities:

switch (Capabilities.playerType) {
 case "Desktop":
  trace("inside Air");
 break;

 default:
  trace("inside Standalone or Browser");
 break;
}


have you tried with flash.system.Capabilities ?

This gives you lot of information about the player running your swf.

0

精彩评论

暂无评论...
验证码 换一张
取 消