# Rotate spritesheet graphics in flixel

I am using the flash flixel engine, and have a sprite sheet of a spaceship from top-down view. The sprite sheet includes a bunch of different states and animation frames. Problem is that I have drawn them all facing upwards (north), and my maths is all done assuming the sprites face to the right (east).

In flixel v2.5 is there a way to rotate the sprite graphics without affecting the "angle" property of the FlxSprite that is using the graphics? I was thinking along the lines of a pre-process, as I initialise everything. I don't really want to fix all the graphics, or hack into my maths at this point. This also might come in handy later.

If you really want to do this in code (instead of converting the sprite-sheets you have), I suggest you use the BitmapData:draw method to draw an existing BitmapData object (your Sprite) into another. When using the draw method you can also supply a transform matrix to use, so basically you do the following:
• @TandemAdam by setting the pixels property of your FlxSprite. You can even use the loadGraphic method and then perform the steps I mentioned in my answer on the pixels property. – bummzack Apr 25 '11 at 21:51
• btw. pixels is the whole graphic as BitmapData object. – bummzack Apr 25 '11 at 21:54