自适应大小事件

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));

posted @ 2015-10-21 10:48  陈同学  阅读(125)  评论(0编辑  收藏  举报