I need to flip a Bitmap horizontally. I tried setting its scaleX property to -1.0, and that modified the Bitmap in such a way that I can see only a small portion of it (flipped) on the left side, instead of the whole flipped Bitmap. Its x property remained 0. I tried the same thing using a transformation matrix, with the same results.
What am I doing wrong?
I posted a simple function to flip a bitmapdata object.
http://plasticsturgeon.com/2010/09/flipping-a-bitmapdata-image/
Here is the relevant code.
If you want to flip the image in a bitmap, you can flip its bitmapdata property like so:
You can switch to a vertical flip by using “y”.