Learn to Program Step-by-Step


Learn ActionScript3 in step-by-step lessons.

Introduction to ActionScript3

What is ActionScript, Important Things to Remember, Naming Movie Clips, Stop!, Live demo of the ball stop movie, Stop Again!, Play!, Self Study Questions

Code Snippets

Live demo of the ball stop play movie, A Spinning Star, Spin with enter frame event, Demo of adding frame event, Spin with timer, Spin with variable to change speed, Navigate to a Web Page

Properties of MovieClips

Properties, MovieClips and the Stage

Events in Actionscript

Click Event: A spinning ball, Buttons for Navigation, Frame Event: A Spinning Star, A Moving Ball, The trace() command, How to Make Tea: A Demo Movie

Variables in Actionscript

Variables, Blast Off!, Relaunch and fire, Select a star to spin, Select ANY star to spin

Arithmetic Operations in Actionscript

Operators, Order of Operations, Algebra, Convert Inches to Feet and Inches using %, Sales Tax: Select decimal values with a Slider component

Math Functions

Math functions, Arrow follows cursor, A Yo-yo with sin function, Eyes follow the cursor

Random Numbers: Math.Random()

Random Numbers: Rolling Dice, Debugging the Dice movie, Add different flowers on click

Boolean values: True or False

Boolean Properties, Moving Ball: Using if, Greetings: Boolean Operators, Bouncing Ball: Using OR, Clicker Clown: Using Else, Making Tea using switch

OOPs: Object Oriented Programming

Spinning Stars: Objects, A Spinner Class, The Spinner Movie: Using a Class, The Clicker Class, Add new instance at run time, Add new instance at run time DEMO, Create a Flasher class

OOPs: More Classes

Create a class: Start with a movie, Create a class: Bubble, Create a class in Flash, Variables, Constructor, Functions, Imports, Linkage, A Water Class, A Flag Class

OOPs: Creating a Bobber Class

Creating a Bobbing Action, One Bobbing Fish, Code for Bobbing Fish, Creating the Bobbing Class, Using the class


Introduction to Loops, While Loops, Endless Loops, for Loops, do while Loops, Spinning Stars, Stop stars created dynamically


Introduction to Arrays, A Scrolling Message, Message Changes

Sound in Actionscript

Play a sound from the library, Play a sound from a URL

Class Variables in Actionscript

Timer Class, Sound Class, URLRequest to play a sound, Start and Stop a Sound with a Channel, URLRequest to Open the Browser, Add New Child at Runtime, List to download classes

Document Class

The Document Class, Create a Navigation Class, Create New Movie with the Navigation Class, A Puzzle Document Class, Puzzle Demo, The Bear Puzzle


Dynamic and input text, A moving ball, Publish the movie, Parameters: Getting values from the HTML, Multiple Parameters, Where am I?

Keyboard Events

Capturing Keyboard Events, Using Keys to Move Object, Keyboard Constants, Combining Keys and Buttons

Drag and Drop

A simple drag and drop example, e.target: Using the same code for many shapes, Dynamically generated stars, Drag and drop dynamically generated shapes, Naming dynamically generated stars

Hit Test

Detect if an object hit another, Detect if an object hit a target inside another, Catch a Falling Star Game, Add a paddle, Add code to movie for hit and miss, Modify FallingStar to hit and miss, Add code to move the paddle

Strings in ActionScript

The String Class, String Functions, Anagrams, Cryptograms


Introduction to XML, XML Messages, A Quiz, Shuffle the Questions, Loading Pictures and Sounds

Changing a Color in ActionScript

Change the Color: ColorTransform, Prepare a Flower for changing petal color, Change the color of the Flower, Color Picker Component, Pick Color with ColorPicker Component, A Random Color, A Random Color with a lighter and darker shading, Shading the Flower with a ColorPicker, Random Shades of a Color


Introduction to Components, CheckBox Demo, Slider Demo, ComboBox: Select a Vehicle, ComboBox: Demo, ComboBox: DataBinding in ActionScript, Radio Buttons, Check Boxes, Numeric Stepper

Drawing in ActionScript3

Introduction to Drawing in ActionScript, Drawing Multiple Shapes, Drawing a Face

Date and Time

Introduction to the Date Class, The Date, A Digital Clock, An Analog Clock (with hands)