I am loading a PNG with transparency into a UILoader. This
part works correctly, transparency and all.
Now I need to find out the rectangle that is transparent. I
found the getColorBoundsRect() function, and copied the
UILoader.content into a bitmapData, but when I run the
getColorBoundsRect it comes back with a Rectangle that has no width
or height - IE, it finds no transparent pixels.
To test, I tried using getPixel32 on an area of the image I
know is transparent, and it comes back to tell me that the pixel
alpha is 255?
I am an idiot. I forgot to set a parameter in the BitmapData
constructor, which tells it to keep transparent pixels transparent.
BitmapData defaults to changing transparent pixels to white, which
is why I was having problems.
var clBD:BitmapData = new