Close Show/hide page

Bitmap Pixel Dissolve

Thumbnail - Click meAn 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.

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.

8 Responses to “Bitmap Pixel Dissolve”

  1. RavenStormCrow:

    WOW DUDE THIS IS SO COOL

  2. platfuse:

    This is really kool

  3. Michał Czaicki:

    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!!

  4. James Rowley:

    Hi – how would i runthis in reverse – so revealing on the image using the same effect?

    Thanks – much obliged.

    Biffer

  5. admin:

    James,

    Great idea. The main routine in the source code would have to be recoded. Could be fun…

    Lee

  6. Wahoo:

    Thank you for sharing!

  7. Leadbased:

    Lee do you think it’s possible to make this an AS2 project? Great work BTW

    Chad

  8. Leadbased:

    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

Leave a Reply