So I’ve got bitmap rendering down (finally) however now I want to pre-compose my bitmaps being scaled or rotated so that I can use a array I create once ot always use when creating more instances.
I figuire I would do it by make a static var that I create a store all my precompositions at the begining of the game and just reference that array whenever I needed it. The problem is that I’m using library items with linkage ID’s so I cant “draw” a BMD object without creating a new instance of the class (can i?). Is there a way around this?
I’m also trying to avoid rendering my graphics out as images as well.
Not 100% sure I understand. I think what you are trying to do is to improve performance by not having to rotate/scale bitmapData on the fly, instead having it done once at the start of the game or before?
One solutions would be to pre-generate the necessary bitmaps before importing them into Flash. For example, if you had a 16x16 character that can be viewed from 8 different angles, you could create a 128x16 bitmap with the character rotated 45 degrees in each frame. Then, when you wanted to draw the character, you copyPixels from the static bitmapData to the actual onscreen bitmap, using an offset to determine which frame to use.
[QUOTE=justkevin;2324286]Not 100% sure I understand. I think what you are trying to do is to improve performance by not having to rotate/scale bitmapData on the fly, instead having it done once at the start of the game or before?[/QUOTE]
Yup, that’s exactly what I’m trying to do. However the method you desribed is alot less practical than just doing the rotation and storing the images in AS as opposed to making a bigger image then cutting it up.