You can find a sample source file, datatypes.fla, in the Samples folder on your hard disk,
which shows you how to use data types in an application.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\DataTypes.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/DataTypes.
About primitive and complex data types
You can divide all the different data type values into two main categories: primitive or complex.
A primitive value (or primitive data type) is a value that ActionScript stores at the lowest level
of abstraction, which means that operations on the primitive data types are generally faster
and more efficient than operations carried out on complex data types. The following data
types all define a set of one or more primitive values: Boolean, null, Number, String, and
undefined.
A complex value (or complex data type) is a value that is not a primitive value and that
references the primitive values. Often, these are called reference data types. Complex values
belong to the Object data type or a data type that is based on the Object data type. Data types
that define sets of complex values include Array, Date, Error, Function, and XML. For more
information on these complex data types, see their entries in the ActionScript 2.0 Language
Reference.
Variables that contain primitive data types behave differently in certain situations than those
containing complex types. For more information, see
on page
106.
ActionScript has the following basic data types that you can use in your applications:
Data type
Boolean
MovieClip
Description
Primitive. The Boolean data type consists of two values:
No other values are valid for variables of this type. The default value of
Boolean variable that has been declared but not initialized is
more information, see
Complex. The MovieClip data type lets you control movie clip symbols
using the methods of the MovieClip class. For more information, see
"MovieClip data type" on page
"Using variables in a project"
"Boolean data type" on page
76.
and
true
false.
. For
false
75.
About data types
73
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?