Data type
null
Number
Object
String
undefined
Void
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.
74
Data and Data Types
Description
Primitive. The null data type contains the value
no value—that is, a lack of data. You can assign the null value in a
variety of situations to indicate that a property or variable does not have
a value assigned to it. The null data type is the default data type for all
classes that define complex data types. An exception to this rule is the
Object class, which defaults to
"null data type" on page 77
Primitive. This data type can represent integers, unsigned integers, and
floating point numbers. To store a floating point number, you should
include a decimal point in the number. Without the decimal point, the
number is stored as an integer. The Number data type can store values
from
Number.MAX_VALUE
more information, see ActionScript 2.0 Language Reference and
"Number data type" on page
Complex. The Object data type is defined by the Object class. The
Object class serves as the base class for all class definitions in
ActionScript, and it lets you arrange objects inside each other (nested
objects). For more information, see
Primitive. The String data type represents a sequence of 16-bit
characters that might include letters, numbers, and punctuation marks.
Strings are stored as Unicode characters, using the UTF-16 format. An
operation on a String value returns a new instance of the string. For
more information, see
Primitive. The undefined data type contains one value:
the default value for instances of the Object class. You can only assign a
value of
to variables that belong to the Object class. For more
undefined
information, see
"undefined data type" on page 80
Complex. The Void data type contains only one value:
data type to designate functions that don't return a value. Void is a
complex data type that references the primitive Void data type. For
more information, see
. For more information, see
undefined
.
(very high) to
Number.MIN_VALUE
78.
"Object data type" on page
"String data type" on page
"Void data type" on page
. This value means
null
(very low). For
78.
79.
. This is
undefined
.
. You use this
void
81.
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?