Any idea about BitmapData?

Hi forum…

i am trying to make an animation that a bitmap splits into its pixels and then the pixels scatter around and then they join together to create the bitmap again in an other coordinat…

i am trying to do this by getting the pixels’ rgb with getPixel32() and dublicate my pixel movieclip and set its RGB to this…

But the problem is that this huge amount of movieclips cause flash to crush down and flash player gives an error that says some code causes flash to bla bla…

Do you have any idea how to do an animation like this? i am succeeded on bitmaps with smaller dimensions… but when the dimension of the bitmap is high there becomes soo many movieclip… and i cant do what exactly i want… is there any other way to do an animation like that?

i wish i could what i want to do…
Thanx for all
Sorry for my terrible english…

Not sure there’s a way that flash can handle a large bitmap, break it into pixels clips then reassemble. For example, if you have a 300x300 image, thats 90000 movieclips! There may be a more effiecent way to do this by redrawing your captured pixels onto one background bitmapData but it still may bog.

Can you make the “pixels” bigger and use the same effect? Say break the image into 10x10 squares then distribute and reassemble with code? You wouldn’t use getPixel to do this of course. You could either dup the clip, and use scrollRect properties to display the correct portion of that image. or you could use bitmapData and just draw that part of the image onto a 10x10 clip. Even using a 5x5 clip will, in theory, reduce your number of clips by 1/25.

Hope this helps

Yea that’s what i use for it now… i use 5*5 (25) pixel parts…

i have an idea but i dunno if it works or not… i will do whole animation in a movieclip… but this time it will draw 90000 pixels to the canvas with drawing api for every position of the pixel… i dunno if this acts faster than the other… at least i wont have 90000 movieclips aroud the movie :wink:

if u see any animation like that pls let me know…
Tnx for ur reply…

I’d like to see a solution for this as well.

based on this thread, I’m building a class that will chop a movieclip into tiles, you can specify rows/columns. It chunks if you specify too many of course, but for creating strips or say 40x40 blocks it works pretty well. I’ll build in a method to return all of the movieclip name in an array so once its broken apart, you can access anyone of the grid items via code. I’ll post in the Source & Expriments section today or tomorrow when I clean it up - it may server a purpose to someone other than myself.