Here’s another strange behavior I’ve noticed in 3.0.2:
I wrote a custom importer to use with the Spritesheet library. One of the things I added was to optionally include a horizontally flipped version of the sheet, with the frame data also flipped. It works fine in v2 and in flash. Here’s the relevant code:
var flippedBitmap = new BitmapData(normalBitmap.width, normalBitmap.height, true, 0x000000); var matrix:Matrix = new Matrix( -1, 0, 0, 1, normalBitmap.width, 0); flippedBitmap.draw(normalBitmap, matrix);
In v3, however, the sheet gets flipped both horizontally and vertically. I’ve tried to isolate why that’s happening, but it’s a little bit beyond me.
The behavior is not present if I just draw the flipped data to a bitmap and display it – it only happens if I use it as a spritesheet. There are probably other cases where it would manifest, though.
For now I’m using a hacky fix that anticipates the problem by conditionally flipping it both ways to begin with:
#if (native && !v2) matrix = new Matrix( -1, 0, 0, -1, normalBitmap.width, normalBitmap.height); #else matrix = new Matrix( -1, 0, 0, 1, normalBitmap.width, 0); #end
So not super urgent, but if anyone has ideas about why this is happening, I’d be interested to know. Thanks!
Edit: I’m targeting Windows, in case it matters.