Reputation: 93
I am coding in AS3 and I am using BitmapData to take a snapshot of a movieclip. Is there a way to have the end result BitmapData to support transparency?
How do I take a snapshot of a movieclip without any background?
Thanks.
Upvotes: 0
Views: 1685
Reputation: 87
Sometimes you need set the background color if you need print the movieclips with transparency
If your background is white:
var bmd:BitmapData = new BitmapData( movieClip.width , movieClip.heigth , true, 0xFFFFFF );
bmd.draw(movieClip);
Upvotes: 1
Reputation: 9572
have you tried the following?
// set the transparent property to true var bmd:BitmapData = new BitmapData( movieClip.width , movieClip.heigth , true ); //pass the movie clip you want to take a snapshot of as a parameter //to the draw() method bmd.draw(movieClip);
Upvotes: 1