Pages

Friday, February 11, 2011

AS3: How to dynamically load image in movieclip

Here is a minimum code required to load an image in movieclip.

SOURCE CODE
var loader:Loader = new Loader();
loader.load(new URLRequest('img_01.jpg'));
mc.addChild(loader);
Note: mc is a movieclip instance present on stage.

No comments:

Post a Comment