0
votes

I am loading an SWF into my main class which extends from Sprite (ActionScript Project using FlashBuilder 4.7 and AIR SDK 3.7). The _appFile is an SWF created with Flex 4 and Flex 3.5 SDK. What could be distorting the SWF? How do I set the SWF width and height to 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
1

1 Answers

1
votes

Was a problem with the stage I changed:

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.displayState = StageDisplayState.FULL_SCREEN; Now It works