Programming in Adobe (Macromedia) Flash 8 ActionScript

Site Root

Examples for learners who might never have programmed before.

Zip Format - Download this tutorial including the .fla and .swf files. (1.5 MBytes Approx)
When you unzip, make sure you select the option to re-create the directory structure.

Lesson

Summary

Homework

01 Hello World!

The classic beginner's program. This demonstrates text output.

Write your own program that displays a message of your choice. Do it without notes!

02 Text IO

Text input and output. This program uses the plus (+) operator to join text together.

Add to this example to ask "where do you live?". Assuming your name is Fred and you live in Norwich, the program should produce output like this ...

"Hello Fred from Norwich."

03 Maths

Adding two numbers together. Arithmetic operators.

Add buttons for + - * / %. Find out what happens if you divide by zero.

04 If

Using IF to validate input data.

Test the second number in the same way as the first.

Adjust the program to divide numbers and validate the input. Ensure the input is numeric and prevent division by zero.

05 Graphics

Plotting Graphics

Write your own program and draw your own shapes.
Experiment with the alpha value to set the transparency of your shapes.
Experiment with the co-ordinates and work out how the co-ordinate system works.
Experiment with the colours.

06 For Loop

Repetition using the For Loop. Graph plotting.

Draw the X axis grid lines.
Plot a graph of y = 4 * x + 2
Plot a graph of y = x * x * x

07 While Loop

Repetition using the While Loop. Line scribbling.

Add another button.
Scribble lines in a different colour when this new button is pressed.
Make the lines less random by having them radiate from a single point.

08 Mouse Tracking

A program that displays the position of the mouse cursor.

Learn the techniques of working with more than one movie frame and be able to re-create this movie without notes. (not easy).

09 Running Total

Under Construction

 

10 Key Press

Under Construction

 

11 Submit Form

A program to submit entered data to another web page.

This allows validated data to be submitted and the validation takes place as the user enters the data.

 

© C N Bauers (2004) - You may use these materials for your self education. Educational institutions may use these materials too.