Hello,

I have a BitmapData and use the draw() method to add sprite data. Then I get the ByteArray through the BitmapData.getPixels() method. This byteArray is compressed and cached.

Then when i need it, i decompress the ByteArray and use the BitmapData.setPixels() and add all that to a new Bitmap()

Next I use the Bitmap.getPixel(MouseX , MouseY) to check if the pixel is white or not. White meaning I cannot 'walk' there.

My question is, can I skip the adding of the ByteArray to the Bitmap and directly access the value corresponding to the x and y in the ByteArray.

This would probably save me some computation time.

How are the bytes stored, is it a multi dimensional array and if so, what is the colum size?

Thank you,

Jiri

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to