Quickstart ActionScript Programming Guide


Here is 8 lines of code to get you started:

Always comment the top of your program. Title, Name and Date as a minimum

The prefix 'mc' on the variable Line indicates that the variable is a movie clip (rather than a string, integer or boolean)

The mcLine is created and a default (or initial) style is applied.

Imagine a pen that can be moved around the stage. The moveTo and lineTo commands allow you to move the pen around and draw lines.

The properties Stage.width and Stage.height return the actual number of pixels across and down the Stage. 0,0 is the top left corner of the Stage.
The command trace will show output messages from your code in a separate output window.
Try adding trace('Hello World'); and trace('Stage.width ='+Stage.width); to your program.
Click on any keyword in your code and press Shift-F1 to pop a reference page. You will see an explanation of the command along with sample application code.

Try drawing the following items using only ActionScript:

If you create any of these items (or any other item) send it to me and I'll post it here with your source code giving you credit ! (daryn_bee@osapac.org)


The following code sample page will accelerate you through the process of creating great code to accomplish non-trivial tasks.


There are four versions of this program, each getting successful better until the final masterpiece version...

The following professional practices make version 4 of the String Art program a bonified masterpiece...

If you have a complex and/or interesting drawing challenge that you have coded, send to me and I'll post it here! (daryn_bee@osapac.org)