Reputation: 221
My question is quite simple - How do I convert a MovieClip (that is dragged from the library) into bitmapData?
PS: I`ve searched a bit for this solution but the only results i get is the other way around - to convert bitmapData into MC/Sprite/bitmap
Upvotes: 2
Views: 6520
Reputation: 12431
You need to make sure the MovieClip
on stage has an instance name and then you can do the following:
var bitmapData:BitmapData = new BitmapData(myMovieClip.width, myMovieClip.height);
bitmapData.draw(myMovieClip);
// And to actually see it
var bitmap:Bitmap = new Bitmap(bitmapData);
this.addChild(bitmap);
Upvotes: 8