开发者

Move the externally loaded content of a MovieClip to another MovieClip

I load an image into a MovieC开发者_高级运维lip. At a second time I want to move this image to another MovieClip. Is this possible? How?


yes, that's possible.

just re-parent the image using removeChild() and addChild():

var loader:Loader = new Loader();
loader.load(new ULRRequest("pathToImage.jpg"));

movieclip1.addChild(loader);

// sometime later ...
movieclip1.removeChild(loader);  // optional
movieclip2.addChild(loader);

voilà ...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜