package CB_3
{
import flash.display.Sprite;
import flash.system.Capabilities;
public class ExpA extends Sprite
{
private var _os:String;
public function ExpA()
{
checkOs();
}
public function checkOs():String
{
_os = Capabilities.os.substr(0, 3);
if (_os == "Mac")
{
trace("Mac");
}else if (_os== "Win")
{
trace("Win");
}else
{
trace("Other");
}
return _os;
}
}
}
AS3基础实例–判断操作系统
最新推荐文章于 2021-07-27 20:10:21 发布