Flex Event.RESIZE 窗口尺寸改变

转:
http://hi.baidu.com/%C1%F5%D4%A81986/blog/item/56b1ff441b6efb8ab2b7dcb4.html
Event.RESIZE 窗口尺寸改变时
stage.width,stage.height 标识当前舞台上所有元素组合后的宽和高
stage.stageWidth,stage.stageHeight 表示当前窗口的宽和高

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
mcA.x = 0;
mcA.y = 0;
stage.addEventListener(Event.RESIZE, resizeHandler);
function resizeHandler(evt:Event){
mcA.width = stage.stageWidth;
mcA.height = stage.stageHeight;
trace(mcA.width);
}
stage.dispatchEvent(new Event(Event.RESIZE));

你可能感兴趣的:(html,Flex,Blog)