Loading external SWF file issue
I am building a SWF player which loads external SWF's.
Rite Now. I could call the external SWF using URLRequest.
but I am getting 2 problems
开发者_开发百科How to run the SWF with the frame rate of the actual SWF movie. How can I know the frameRate of external SWF dynamically from within AS3.
I have set a layer of 450px by 350px. How do I scale the external SWF with showall property to fit in the layer.
see this url for the framerate : http://www.gotoandlearn.com/play.php?id=112
try to use the loaderInfo
property of the loader object to resize your swf,
ex :
var l:Loader = new Loader();
l.load(new URLRequest("urlToYourSwf"));
l.loaderInfo.addEventListener(Event.COMPLETE, completeFunction);
// completeFunction
l.loaderInfo.width = xxx;
l.loaderInfo.height = xxx;
addChild(l);
精彩评论