Bitmap Pixel Dissolve
An image fade/dissolve where the individual pixels move off the bitmap and disappear. Written a couple months ago to learn how to get around in AS3. Not to be confused with the built-in BitmapData.pixelDissolve method.
In the supplied AS3 class, the direction of the movement of pixels is ‘hard coded’ to go from right to left. (Here’s the full project, as well.) To move the pixels in the opposite direction or up and down, the bitmap is rotated 90, 180, or 270 degrees and the wrapper sprite is rotated equally in the opposite direction - which is possible to interpret as a kludge.
To-do: Change the method used to select pixels that are to be animated. The way it’s done now is inefficient. If you look at the code, you’ll see what I mean. Again, if anyone wants to post any changes to the class that improves performance, please do.
Some other possible to-do’s: Dissolve images in an arbitrary direction; allow pixels to trail beyond the current boundaries of the bitmap; allow for the changing of parameter variables’ values while the effect is in progress; support for transparency.
Eating away individual pixels of a bitmap similar to what’s done here, it seems to me, could be the basis for some fun retro gameplay mechanics for a Flash-based game, à la Lemmings or Worms.
Version: 0.9
Licensed under a Creative Commons Attribution 3.0 License.

April 15th, 2007 at 6:18 pm
WOW DUDE THIS IS SO COOL
August 25th, 2007 at 10:28 am
This is really kool
September 12th, 2007 at 8:00 am
Great effect!!
I wonder if it won’t look better if You blur a bit pixels near this one detached from bitmap…?
For example You can left this detached pixel, but with transparency, and delete it when next pixel will be detached.
Adding blur to moving pixels will also make great impression.
Anyway very nice effect!!
September 19th, 2007 at 10:16 am
Hi - how would i runthis in reverse - so revealing on the image using the same effect?
Thanks - much obliged.
Biffer
September 19th, 2007 at 1:13 pm
James,
Great idea. The main routine in the source code would have to be recoded. Could be fun…
Lee
October 6th, 2007 at 10:38 pm
Thank you for sharing!
November 8th, 2007 at 4:00 pm
Lee do you think it’s possible to make this an AS2 project? Great work BTW
Chad
November 8th, 2007 at 4:24 pm
Hey Lee I am trying just get your files all working together and I am getting this error below when using Document Class without Strict Mode. Have you any suggestions on how to resolve it?
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at BitmapDissolveApp$iinit()
at BitmapDissolveApp::as/BitmapDissolveApp::frame1()
Thanks,
Chad