EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 74

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
74 Data and Data Types
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.
null Primitive. The null data type contains the value null. This value means
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
undefined. For more information, see
“null data type” on page 77
.
Number 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 (very high) to Number.MIN_VALUE (very low). For
more information, see ActionScript 2.0 Language Reference and
“Number data type” on page 78.
Object 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 “Object data type” on page 78.
String 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 “String data type” on page 79.
undefined Primitive. The undefined data type contains one value:
undefined. This is
the default value for instances of the Object class. You can only assign a
value of
undefined to variables that belong to the Object class. For more
information, see “undefined data type” on page 80
.
Void Complex. The Void data type contains only one value: void. You use this
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 “Void data type” on page 81.
Data type Description

Table of Contents

Related product manuals