03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Global Functions<br />

This section contains a set of built-in functions that are available in any part of a SWF file<br />

where <strong>ActionScript</strong> is used. These global functions cover a wide variety of common<br />

programming tasks such as working with data types (Boolean(), int(), <strong>and</strong> so on),<br />

producing debugging information (trace()), <strong>and</strong> communicating with Flash Player or the<br />

browser (fscomm<strong>and</strong>()).<br />

Global Functions summary<br />

Modifiers Signature Description<br />

Array([numElements:N<br />

umber],<br />

[elementN:Object]) :<br />

Array<br />

asfunction(function:<br />

String,<br />

parameter:String)<br />

Boolean(expression:O<br />

bject) : Boolean<br />

Creates a new, empty array or converts specified<br />

elements to an array.<br />

A special protocol for URLs in HTML text fields<br />

that allows an HREF link to call an <strong>ActionScript</strong><br />

function.<br />

Converts the parameter expression to a Boolean<br />

value <strong>and</strong> returns true or false.<br />

call(frame:Object) Deprecated since Flash Player 5. This action was<br />

deprecated in favor of the function statement.<br />

Executes the script in the called frame without<br />

moving the playhead to that frame.<br />

chr(number:Number) :<br />

String<br />

Deprecated since Flash Player 5. This function<br />

was deprecated in favor of<br />

String.fromCharCode().<br />

Converts ASCII code numbers to characters.<br />

clearInterval(interv Stops the setInterval() call.<br />

alID:Number)<br />

clearTimeout(id:Numb Cancels a specified setTimeout() call.<br />

er)<br />

duplicateMovieClip(t<br />

arget:Object,<br />

newname:String,<br />

depth:Number)<br />

escape(expression:St<br />

ring) : String<br />

Creates an instance of a movie clip while the SWF<br />

file is playing.<br />

Converts the parameter to a string <strong>and</strong> encodes it<br />

in a URL-encoded format, where all<br />

nonalphanumeric characters are replaced with %<br />

hexadecimal sequences.<br />

Global Functions 43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!