I think a ByteArray is much more suitable to implement a bit array. For one,
you can grow it or shrink it easily (you can't do that with a bitmapdata; at
best, you'd have to make a new one and copy the data). And it's just plain
easier and more logical, as you can address each byte directly.

With a bmd, you'd have to store and retrieve 3 or 4 bytes each time
(depending on whether you use transparency and getPixel32 / setPixel32 or
getPixel / setPixel), and do some additional bit shifting and masking, plus,
you'd have to use some additional math to map bit positions to pixel
coordinates.


Cheers
Juan Pablo Califano



2008/11/29, Anthony Pace <[EMAIL PROTECTED]>:
>
> I was wondering if anyone had tried using the bitmapdata object as a bit
> array?  and personal experiences with doing so.  Is it to overly complicated
> to work well?
>
> Thanks,
> Anthony
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to