Download the source: dissolve.zip
Step 1
- Create a new flash Project ,
- New flash file > Document (shortcut key: Ctrl+J ). Set the width of your document to 300 pixels and the height to 180 pixels.
- Select any color as background color and set your Flash movie’s frame rate to 32 fps.
- Change the layer name to Image
- Import your Photo: File > Import > Import to stage (Ctrl+R) and import any photo into a flash stage.
- While the image or object is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.
- While the new made Movie Clip is still selected, go to the Properties Panel 0n the right side (up) and change the Instance name input field to Image.
Step 2
- Create a new layer above the layer image and name it button.
- Now create a button, type on it Button and convert it into a button symbol.
- While the new made Movie Clip is still selected, go to the Properties Panel 0n the right side (up) and change the Instance name input field to myButton.
Step 3
- Create a new layer above the layer button and name it actionscript.
- Select the first frame of layer action and go to the AS panel (F9) and paste this code:
import fl.transitions.*;
import fl.transitions.easing.*;
DissolveButton.addEventListener(MouseEvent.CLICK, dissolveMyObject);
function dissolveMyObject(event:MouseEvent) {
TransitionManager.start(Image, {type:PixelDissolve, direction:Transition.IN, duration:2, easing:Regular.easeIn, xSections:10, ySections:10});
}








April 26, 2010
CS4