A Flash Spaceship with Movieclips and Buttons – Actionscript 2 & 3

Overview

A basic tutorial on Flash interactivity. In this project you create a Flash spaceship movieclip with 3 different states: thrusting, stopped, and shields. You will write the Actionscript code for three buttons, that will move the movieclip to three different animated states.

In the video tutorials below, I demonstrate how to create this project in Flash Professional CS6. The project uses: keyframe animation, movieclips, buttons, frame labels, instance names, the gotoAndPlay() and gotoAndStop() function, and the onPress event handler.

Video Tutorials 

In part 1, I create the spaceship movieclip and the three button symbols

In part 2, I create a looping animation and write the actionscript to control the timeline playhead using Flash buttons

In part 3, I set the button activation area, create timeline keyframe animation, use frame labels
with the gotoAndPlay() function, and use the onPress event handler to create a custom button function

In part 4, I show how to convert the Flash file from Actionsctipt 2.0 to 3.0

 

First Generation Video Tutorials

The videos below are early tutorials that I created for this project. In the videos, I am using an older version of Flash. The videos are examples of some of my earliest attempts at creating video tutorials. Even though the project was created with Flash CS3, the scripting is still valid Actionscript 2.0 code and will work in current versions of Flash.

Watch the videos and create the project. Save your flash authoring file (.fla) and email it to my gmail account as an attachment.

Note: The tutorials above were created in Flash CS3, but can easily be created in Flash CS4 or CS5. Make sure to choose Actionscript 2.0 when creating a new file to work from.

Author: Dan

Dan teaches computer networking and security classes at Central Oregon Community College.

Leave a Reply

Your email address will not be published. Required fields are marked *