如果您可以编辑加载的 swf,请将此代码放入 LOADED swf 中:
if (stage==null) { //first we need to wait till the stage is initialized
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
} else {
onAddedToStage();
}
function onAddedToStage(event:Event=null):void {
stage.addEventListener(Event.RESIZE, updateGUI); //resize something everytime we resize our browser window
updateGUI(); //resize for the first time
}
function updateGUI(event:Event=null):void {
//scale what you need
//you can access the *stage* variable from inside the loaded swf, for eg.
square.width = stage.stageWidth/4;
}
如果没有,请尝试缩放您加载另一个 swf 的影片剪辑