Flashvault.net

Airplane animation by action script

10.4.2007, 16:12    Total views: 43671
Read this tutorial and learn how to create airplane animation using the Action Script in flash 8. You will also learn:

1. How to convert airplane into a Moive Clip Symbol.
2. How to create a button, that will be control airplane animation
3. How to use Instance input field from the Properties Panel and more.



Step 1

Open a new Flash document.

Step 2

Press Ctrl+J (or select Modify > Document ). Set the Frame rate for your movie to 16 frames per second (fps). Select #E1EDFF as background color and click ok.



Step 3

Using the Flash Tools for drawing (Line Tool, Oval Tool), draw some airplane. See the picture below.



Step 4

Take the Selection Tool (V), select the airplane and press F8 key (Convert to Symbol) to convert this airplane into a Movie Clip Symbol.



Step 5

After that, place the airplane on the position like it is shown on the picture below.



Step 6

Click on frame 16,17 and 34 and press F6 key on the keyboard.

Step 7

Go back on frame 16, take the Selection Tool (V) and place the airplane on this position:



Step 8

Take the Selection Tool (V), click once on frame 16 and press Ctrl+C key (Copy). Then. click on frame 17, press delete key on the keyboard and after that Ctrl+Shift+V key (Paste in Place).

Step 9

While you're still on frame 17, take the Free Transform Tool (Q) press and hold down Shift key and change the path of airplane like it is shown on the picture below.



Step 10

Take the Selection Tool (V), click on frame 17 and press Ctrl+C key (Copy). Then, click on frame 34, press delete key and after that Ctrl+Shift+V key (Paste in Place).

Step 11

While you're still on frame 34, take the Selection Tool (V) and place the airplane on the position like it is shown on the picture below.



Step 12

Right-click anywhere on the gray area between frame 1 and 16 and frame 17 and 34 on the timeline and choose Create Motion Tween from the menu that appears.See the picture below.



Step 13

Double click on layer 1 to rename its name in airplane. After that, create a new layer above the airplane layer and name it buttons.

Step 14

Select the buttons layer and create a three buttons and name it "Stop", "Right" and "Left". See the picture below.



Step 15

Take the Selection Tool (V), click once on the "Stop" button to select it and go to the Action Script Panel (shortcut key: F9). Then, enter the following ActionScript code inside the Actions panel:

on (release) {
stop();
}

Step 16

Then, select the "Right" button and enter this code inside the Actions Panel:

on (release) {
gotoAndPlay("goright");
}

And finally, select the "Left" button and enter this code inside the Actions Panel:

on (release) {
gotoAndPlay("goleft");
}

Step 17

Create a new layer above the buttons layer and name it Labels.

Step 18

Click on frame 2 of layer Label and go to the Properties Panel (Ctrl+F3) below the stage. On the left side, You will find the Instance name input field there. In that field type "goright". See the picture below.



Step 19

After that, Click on frame 17 and press F6 key. Then, go again into the Properties Panel below the stage. In the Instance input field type "goleft".





Step 20

Create a new layer above the Labels layer and name it Action.

Step 21

Click on the first frame, and enter this code inside the Actions panel (F9).

stop();

Step 22

Click on frame 16 and press F6 key. After that, enter this code inside the Actions Panel:

stop();

Test your Movie (Ctrl+Enter).

Enjoy!

Download source file (.fla)
Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Forum - Newest Discussions

Convert AVI Video to Flash
Last post by: linddy
Date: 29.11.2008 04:40:55

photogallery
Last post by: trnghosn
Date: 26.11.2008 16:22:19

For Sale Brand NewHTC Touch HD $380Samsung i900 Om
Last post by: so100
Date: 25.11.2008 13:01:33

For Sale Brand NewHTC Touch HD $380Samsung i900 Om
Last post by: so100
Date: 25.11.2008 13:00:48

Waiting for your hour of triumph? It is near!
Last post by: VitaMary
Date: 21.11.2008 18:46:41

Yeow dogs!
Last post by: deco11
Date: 21.11.2008 01:15:49

Show your girlfriend what a real sex is!
Last post by: VitaMary
Date: 20.11.2008 22:00:13

Regarding the Gradient by Mouse Tutorial...
Last post by: cloudy-days
Date: 19.11.2008 07:41:03

Open flash cs3 fla in flash 8???
Last post by: benjezza
Date: 14.11.2008 23:41:46

Related links