2

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

GregorII
  • 221
  • 4
  • 13
  • That really depends what you want to do with the converted MC - is a MC with more then one frame? cacheAsBitmap will not suit your needs? – GeorgeCross May 19 '14 at 20:11

1 Answers1

8

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);
net.uk.sweet
  • 12,444
  • 2
  • 24
  • 42