Table of Contents

18.1 Global Functions

Global functions are built-in functions that are available throughout an entire movie—they can be invoked from any frame, button, or event handler in a movie (unlike methods, which must be invoked using a reference to a specific object).

Table 18-1 lists the global functions available in Flash 6, including two new global functions: clearInterval( ) and setInterval( ). All other global functions listed in the table are available in Flash 5 as well. Table 18-1 also lists the directives and pragmas, which begin with the # character — namely, #include, #initclip, and #endinitclip.

Table 18-1. ActionScript global functions

Boolean( )

gotoAndStop( )

parseInt( )

stopAllSounds( )

call( )

#include

play( )

stopDrag( )

clearInterval( )[1]

#initclip[1]

prevFrame( )

String( )

Date( )

int( )[2]

prevScene( )

targetPath( )

duplicateMovieClip( )

isFinite( )

print( )

tellTarget( )[2]

#endinitclip[1]

isNaN( )

printAsBitmap( )

toggleHighQuality( )[2]

escape( )

loadMovie( )

printAsBitmapNum( )

trace( )

eval( )

loadMovieNum( )

printNum( )

unescape( )

fscommand( )

loadVariables( )

random( )[2]

unloadMovie( )

getProperty( )

loadVariablesNum( )

removeMovieClip( )

unloadMovieNum( )

getTimer( )

nextFrame( )

setInterval( )[1]

updateAfterEvent( )

getURL( )

nextScene( )

setProperty( )

 

getVersion( )

Number( )

startDrag( )

 

gotoAndPlay( )

parseFloat( )

stop( )

 

[1] Supported in Flash 6, but not in prior versions.

[2] Deprecated in Flash 5 and later versions.


Table of Contents