I have a class that extends SWFLoader, I use it as a regular SWFLoader:
var loader:MySWFLoader = new MySWFLoader();
loader.load("myFile.SWF");
myScene.addChild(loader);
The load is fine, except that it remains 0 because the width and height never change from 0. I had to redefine the width / height get properties to make it work:
class MySWFLoader extends SWFLoader
{
public override function get width():Number{ return contentWidth; }
public override function get height():Number{ return contentHeight; }
}
Like a big hack, this is not entirely correct; especially since SWF has several frames, and frames have different widths / heights.
Why doesn't width / height work in the first place? Shouldn't they automatically install at boot time? Is it possible that the problem is related to the SWF itself?
Update : changing the scaleContent value to true or false does not matter.
source
share