User Guide
32 ActionScript language elements
Global Functions
This section contains a set of built-in functions that are available in any part of a SWF file
where ActionScript is used. These global functions cover a wide variety of common
programming tasks such as working with data types (
Boolean(), int(), and so on),
producing debugging information (
trace()), and communicating with Flash Player or the
browser (
fscommand()).
Global Functions summary
Modifiers Signature Description
Array([numElements], [elementN]) :
Array
Creates a new, empty array or
converts specified elements to an
array.
Boolean(expression:Object) : Boolean Converts the parameter
expression to a Boolean value and
returns true or false.
call(frame:Object) Deprecated since Flash Player 5.
This action was deprecated in favor
of the function statement.
Executes the script in the called
frame without moving the playhead
to that frame.
chr(number:Number) : String Deprecated since Flash Player 5.
This function was deprecated in
favor of String.fromCharCode().
Converts ASCII code numbers to
characters.
clearInterval(intervalID:Number) Cancels an interval created by a call
to setInterval().
duplicateMovieClip(target:Object,
newname:String, depth:Number)
Creates an instance of a movie clip
while the SWF file is playing.
escape(expression:String) : String Converts the parameter to a string
and encodes it in a URL-encoded
format, where all nonalphanumeric
characters are replaced with %
hexadecimal sequences.
eval(expression:Object) : Object Accesses variables, properties,
objects, or movie clips by name.