开发者

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

开发者_开发百科
  1. 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.

  2. 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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜