views:

113

answers:

1

Hi, in actionscript 3, what's the fastest way to dump your data (not from a file) into a bitmap for display?

I have it working with setPixels and colored rects but that's way too slow/inefficient.

Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?

What would be the best/fastest--should I start writing a byte encoder?

+1  A: 

You can quickly copy data from a ByteArray into a Bitmap using setPixels(). Even if you need to do some wrangling of your data beforehand, it should be way faster than setting each pixel individually.

grapefrukt
I'm already doing that and it works pretty good with fillrect. I'm wondering if there is an alternative that is faster.
Looks like I'm going to go with something similar to base64 like I originally thought.Thanks for the help anyways.