我正在将SWF加载到我的主类中,该主类从Sprite扩展(使用FlashBuilder 4.7和AIR SDK 3.7的ActionScript项目)。 _appFile是使用Flex 4和Flex 3.5 SDK创建的SWF。什么可能扭曲SWF?如何将SWF宽度和高度设置为100%。
//load the _appFile
_fs.open(_appFile,FileMode.READ);
var ba:ByteArray = new ByteArray();
_fs.readBytes(ba);
_fs.close();
var context:LoaderContext = new LoaderContext();
context.allowCodeImport = true;
context.applicationDomain = ApplicationDomain.currentDomain;
var loader:Loader = new Loader();
this.addChild(loader); //required so that the loaded SWF has access to the 'stage' property
loader.loadBytes(ba,context); //run the loaded SWF within the security sandbox of this application
答案 0 :(得分:1)
我改变了舞台的问题:
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.displayState = StageDisplayState.FULL_SCREEN; Now It works