ss_blog_claim=6cc36089df6176e157debf161c6105b8
Your Ad Here

Tuesday, November 24, 2009

Flash ActionScript 3.0 loading external movieclip/swf

I've been learning ActionScript 3.0 for the past few days during my "free" time due to several reasons.

So far i've learned how to create flvplayer using actionscript 3.0 and loading another movieclip (swf file) into another movieclip (swf).

So in this post, i wanna show how easy it is to use actionscript 3.0 to load external movieclip (swf) into another movieclip (swf).

I tried to google up how to do it but no one seems to provide a short and simple way to do it so i get a long working copy and simplify it down to this.

var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("MyMovie.swf");
mLoader.load(mRequest);
addChild(mLoader);

YES! Just 4 lines of simple code!

0 comments:

Your Ad Here