About declaring variables

You can declare variables on a frame in the timeline, directly on an object, or within an external class file.

Define variables using the var keyword and follow the variable naming conventions. You can declare a variable called firstName, as shown in the following example:

var firstName:String;

When you declare a variable, you assign a data type to the variable. In this case, you assign the String data type to the firstName variable. For more information on assigning data types, see About assigning data types and strict data typing.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000655.html