I’m using copyPixels to copy a parts of a larger Bitmap to smaller Bitmaps to use for individual MovieClips. However, around there is still some extra space white space and corners around the Bitmaps’ edges left over. How do I set the color white in the Bitmap to be transparent so I won’t see these unsightly edges?
I’m using copyPixels to copy a parts of a larger Bitmap to smaller Bitmaps
Share
You can use the BitmapData.threshold method. This code creates a BitmapData with a red square on a blue background, then uses the threshold method to make the red pixels transparent.