自适应大小事件

Application.application.stage.addEventListener(Event.RESIZE, function(event:Event):void
{
    trace("screenResolutionX", Application.application.width);
    trace("screenResolutionY", Application.application.height);
    trace("screenResolutionX", stage.stageWidth);
    trace("screenResolutionY", stage.stageHeight);
});

Application.application.addEventListener(ResizeEvent.RESIZE, function(event:ResizeEvent):void
{
    trace("aa", Application.application.width);
    trace("bb", Application.application.height);
});
Application.application.dispatchEvent(new ResizeEvent(ResizeEvent.RESIZE));

原文地址:https://www.cnblogs.com/chencidi/p/4897177.html