导入 use namespace mx_internal;
import mx.core.UIComponent;
var m_uic:UIComponent = new UIComponent();
thsi.addChild(m_uic); //把场景所有的东西都加载到m_uic里面。。。
初始化的时候监听 : addEventListener(Event.RESIZE,onResize);
调整方法:
private function onResize(evt:Event=null):void//窗口自动调整
{
m_uic.$width=width;
m_uic.$height=height;
}