About data types
73
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
“Using variables in a project”
on page 106
.
ActionScript has the following basic data types that you can use in your applications:
Data type
Description
Boolean
Primitive. The Boolean data type consists of two values:
true
and
false.
No other values are valid for variables of this type. The default value of
Boolean variable that has been declared but not initialized is
false
. For
more information, see
“Boolean data type” on page 75
.
MovieClip
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 76
.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...