我的AS3代码:
var ldr:Loader = new Loader();
ldr.load(new URLRequest("midos.swf"));
addChild(ldr);
但我的swf分辨率为720x460。
我的项目决议720x480。如何将我的swf全部填入项目屏幕?
答案 0 :(得分:0)
//assuming that you want to scale it based on your stage. If not, just provide correct value
var targetHeight:Number = stage.stageHeight;
var scale:Number = targetHeight / ldr.height;
ldr.scaleY = scale;
//if you want to scale proportionally
ldr.scaleX = scale;