Summary

I l @ ve RuBoard

A script uses a set of symbols that you need to become familiar with to read and write ActionScript. Curly brackets surround segments of code that belong together. Dots, or periods, tie together objects and their properties.

There are two types of variables. Global variables are available to the entire movie level, whereas local variables are available only to the current function or script. You can set variable contents with = , and use + , - , / , and * to perform operations on variables and numbers . The shorthand ++ and -- will add and subtract 1 from a variable, whereas += and -= will add or subtract a specific number from the variable.

You can compare two values to see whether they are equal by using the == symbol. You can also use < , > , <= , and >= to test values. A test always results in a true or false value that can be used by an if statement to run code only if the test is true.

There are several kinds of loops , but the main one is the for loop that counts with a variable from one value to another. The for statement has specific syntax that you should get to know well.

Functions can be used to group bits of code together so that they can be used by many different parts of your program. They can accept values, known as parameters, and return a value as well.

Debugging can be done by one of three methods : logical deduction , use of the trace command, or Flash's built-in debugger.

I l @ ve RuBoard


Sams Teach Yourself Flash MX ActionScript in 24 Hours
Sams Teach Yourself Flash MX ActionScript in 24 Hours
ISBN: 0672323850
EAN: 2147483647
Year: 2002
Pages: 272

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net