Flash tutorials
Home 3D (2) Actionscripting (66) Animation (108) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (61) Text Effects (38)

Airplane animation by action script

10.4.2007, 16:12    Total views: 100183
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!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 298069

2. High-tech city animation
Total views: 248622

3. Water effect
Total views: 227369

4. Photo slide show
Total views: 209587

5. Special Picture Effect
Total views: 185184



Related links