somebody621 -> RE: Flash Q&A Thread 4 (9/28/2007 19:31:50)
|
Been experimenting with bitmapData, and it's really confusing at times. lol. I might post some stuff on it soon, as it is MUCH faster than using the draw API or vectors or fractals, or the rain thing. What you basically do is make a spritesheet or a bitmap, and using the loader class, load the spritesheet or bitmap in. Then you use copy pixels to "copy" the part you want to draw onto a bitmapData and basically paste it on the screen every frame. Or you can find some line drawing algorithms and use setPixel to draw a line, which is actually faster than the drawAPI. I think bytearray.org has a class(AS3) which can draw lines. To update the screen, you either use the dispose() method of bitmapData or use a fillrect on it. This is MUCH faster than using vectors. Sorry if I wasn't being clear, but I'm kinda in a hurry. Will elaborate or post code on this soon. Yeah, a lot of this information was found on FlashKit lol. We're really behind the times.
|
|
|
|