Read this thoroughly explained, detailed flash lesson and see how to create advanced header animation using some special flash tips and tricks, mouse cursor and action script code. You can use this animation for any flash header, presentation or for some flash components. Using this lesson, you will also learn how to import any object into a flash stage, how to convert it into a Movie Clip Symbol, how to apply action script ode on it and much much more!
Example:
Move your mouse cursor over the image!
Step 1
First, save the image below that we will use for this lesson.
Step 2
Create a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the width of your document to 450 pixels and the height to 300 pixels. Select white color as background color. Set your Flash movie's frame rate to 34 and click ok.
Step 3
Call the current layer image. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!
Step 4
Choose now File > Import > Import to stage (Ctrl+R) and import the image that you just saved in step 1 into a flash stage. While the image 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.
Step 5
While the image is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.
Step 6
Click now on frame 25,30 and 50 and hit F6 key. While you're still on frame 50, select the Selection Tool (V) and click once on the image to to select it. After that, go to the AS panel (F9) and enter this code inside the actions panel:
onClipEvent (enterFrame) {
if(_root.as_image_animation==1) {
homeX = -_root._xmouse/5+450-180;
diffX = homeX-_x;
moveX = diffX/8;
if(Math.abs(moveX)>0.5) {
_x += moveX;
}
}
}
Step 7
Go back now on the first frame and place the image on the position like it is shown on the picture below!
Step 8
Select the Selection Tool (V) and click once on the image to select it. After that, go to the Properties Panel (Ctrl+F3) below the stage! Then, select Filters tab from the left side. Click after that on the plus icon and select the Blur filter. Make the adjustments as follows:
Step 9
Select now frame 25 and place the image on the position like it is shown on the picture below!
Step 10
Right-click anywhere on the gray area between frame 1 and 25 and frame 25 and 30 on the timeline and choose Create Motion Tween from the menu that appears.
Step 11
Select now frame 50 again and go to the Action Script Panel (F9). After that, enter this code inside the actions panel:
stop();
Step 12
Create a new layer above the layer image and name it action script. After that, select frame 50 and hit F6 key. While you're still on frame 50, go again on the As panel (F9) and enter this code inside the actions panel:
_root.as_image_animation=1;
We're done now!
Test your movie and enjoy!
lundi 26 octobre 2009
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire