Full photo mask animation
Submited in: Flash
| Total Views: 11706
In this thoroughly explained, detailed flash lesson, I will show you how to create full photo mask animation using some special flash tips and tricks and action script code. You can use this animation for any flash banner or for some presntation. Using this lesson, you will also learn how to import any photo into a flash stage, how to animate it, apply action script code, convert any layer into a mask and much more!
First, find any photo which you like to use for this lesson.
Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the dimensions of your document as the dimensions of photo. Select any color as background color. Set your Flash movie's frame rate to 33 and click ok.
Call the current layer photo. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!
Choose now File > Import > Import to stage (Ctrl+R) and import any photo into a flash stage.
While the photo is still selected, go to the Align Panel (Ctrl+K) and do the following:
1. Make sure that the Align/Distribute to Stage button is turned on,
2. Click on the Align horizontal center button and
3. Click the Align vertical center button.
Select now the first frame of layer photo and hit F6 key fifteen times. See the picture below!
Select now frame 2 and hit delete key on the keyboard. Repeat this process also for frame 4,6,8,10,12 and 14. See the picture below!
Go back now on the first frame again and go to the AS panel (F9). After that, enter this code inside the actions panel:
startDrag ("/object", true);
_root.drag = object;
Create a new layer above the layer photo and name it mask. After that, select mask layer and draw a circle shape like it is shown on the picture below!
While the circle 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 below the stage. On the left side, You will find the Instance name input field there. Call this Movie Clip object. See the picture below!
Select now mask layer and convert it to a mask by right-clicking on the mask layer and selecting Mask.
We're done now!
Test your movie (Ctrl+Enter) and enjoy!