BitmapTransitions
From WikiFlashed
BitmapData.pixelDissolve: I was playing around with the BitmapData class's pixelDissolve method to try and create an arcade game director-esque pixel dissolve transition. The first attempt transitions between two different colored bitmaps. This is quite useful if made properly into a modular class for use in between game levels, galleries etc.
Author
- WikiFlashed
- http://www.wikiflashed.com
Logics
Pixel Dissolve transition is just playing around with bitmap data. A picture is essentially made up of lots of pixels. So you will need the flash.display.Bitmap and flash.display.BitmapData class.
You first turn two pictures into two different bitmap datas and use an onEnterFrame to traverse through the pictures in blocks and run pixelDissolve on the same block coordinate in both bitmap data.
function onEnterFrame(event:Event):void { // dissolve it seed = bitmaps[bd1].pixelDissolve(bitmaps[bd2], bitmaps[bd1].rect, new Point(), seed, numPixels); pixelCounter += numPixels; // end onEnterFrame if (pixelCounter > w * h) { clearDissolve(); } }