开发者

bitmap data as movie clip

I import my images with

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); imageLoader.load(imageRequest);

and then try and cast as a moviecl开发者_如何学Pythonip:

var newImage:MovieClip = imageLoader.content as MovieClip; addChild(newImage);

i keep getting errors, is this possible?

Thanks,

Ross


Don't cast it as a MovieClip. Just add the loader to the stage, like this:

addChild(imageLoader);


you can only do that when the loader has completed loading.

so if that bit of code is in the onComplete function, and you're doing var newImage:MovieClip = e.content as MovieClip;, that should work.

What specific errors are you getting?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜