EasyManua.ls Logo

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

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...
80 Data and Data Types
To include a quotation mark in a string, precede it with a backslash character (\). This is called
escaping a character. There are other characters that cannot be represented in ActionScript
except by special escape sequences. The following table lists all the ActionScript escape
characters:
Strings in ActionScript are immutable, just as they are in Java. Any operation that modifies a
string returns a new string.
The String class is a built-in ActionScript class. For information on the methods and
properties of the String class, see the String entry in the ActionScript 2.0 Language
Reference.
undefined data type
The undefined data type has one value, undefined, and is automatically assigned to a variable
to which a value hasnt been assigned, either by your code or user interaction.
The value
undefined is automatically assigned; unlike null, you dont assign undefined to a
variable or property. You use the undefined data type to check if a variable is set or defined.
This data type lets you write code that executes only when the application is running, as
shown in the following example:
if (init == undefined) {
trace("initializing app");
init = true;
}
Escape sequence Character
\b
Backspace character (ASCII 8)
\f
Form-feed character (ASCII 12)
\n
Line-feed character (ASCII 10)
\r
Carriage return character (ASCII 13)
\t
Tab character (ASCII 9)
\"
Double quotation mark
\'
Single quotation mark
\\
Backslash
\000 - \377
A byte specified in octal
\x00 - \xFF
A byte specified in hexadecimal
\u0000 - \uFFFF
A 16-bit Unicode character specified in hexadecimal

Table of Contents

Related product manuals