You want to fade between one bitmap and another.
Use the pixelDissolve() method of the BitmapData class.
Like many of the other BitmapData methods, pixelDissolve() uses a source and destination bitmap. Each time it is called, it copies a specified number of random pixels from the source bitmap to the destination. To complete a full dissolve, call this method repeatedly, either in an enterFrame handler or a timer-based function. See Recipe 11.1 for information on timer-based animation.
The first time the pixelDissolve() method is called, you pass it a random number to use as a seed for the first round of pixel copying. It returns a number that you should keep track of and use as the seed for the next iteration.
Here is the syntax for the method:
work the same way they do in other BitmapData methods that use two
seed is explained more
in Recipe 8.10.
determines how many pixels are copied each time the method is
fillColor offers an easy
way of fading a single bitmap to a specified color. If you use the
same BitmapData as source and destination, instead of copying identical pixels from one to the other (which would have no visible effect), the chosen pixels are set to the fill color specified in this parameter. You can ignore this when using two different ...