Global functions are called without an object. Inside a movie clip class, the timeline functions such as
gotoAndStop are better called as methods of the clip. The player column is
the first Flash Player that has each one, as Adobe’s ActionScript 2.0 reference gives
it.
Every global function
| Function | Does | Player |
|---|---|---|
play, stop, gotoAndPlay, gotoAndStop, nextFrame, prevFrame, nextScene, prevScene | Control the playhead of the current timeline. | 2 |
stopAllSounds() | Stops every sound. | 3 |
getURL(url, [window, [method]]) | Opens a URL, optionally sending variables. | 2 |
fscommand(command, args) | Sends a command to the browser’s JavaScript or the standalone player. | 3 |
loadMovie, unloadMovie, unloadMovieNum | Load and unload movies and images in clips and levels; JPEG from player 6, GIF, PNG and progressive JPEG from 8. | 3 |
loadMovieNum | Loads into a level. | 4 |
loadVariables, loadVariablesNum | Load URL-encoded variables into a clip or level. From player 7 the URL must be in exactly the same domain, unless a cross-domain policy file allows it. | 4 |
duplicateMovieClip, removeMovieClip, startDrag, stopDrag | Copy, remove and drag clips. | 4 |
getProperty, setProperty | Read and set clip properties by name. | 4 |
targetPath(clip) | A clip’s path in dot syntax. | 5 |
updateAfterEvent() | Redraws at once from an event or interval. | 5 |
getTimer() | Milliseconds since the movie started. | 4 |
getVersion() | The player’s platform and version. | 5 |
trace(value) | Writes to the Output panel when testing; can be left out when publishing. | 4 |
Number, String | Convert a value; results changed in player 7. | 4 |
Boolean | Converts a value; results changed in player 7. | 5 |
Object | Makes an object or wraps a value. | 5 |
Array | Makes an array. | 6 |
parseInt, parseFloat, isNaN, isFinite | Read and test numbers. | 5 |
escape, unescape | URL-encode and decode strings. | 5 |
eval(name) | The variable, property or clip with a name. | 5 |
setInterval, clearInterval | Repeated calls. | 6 |
setTimeout, clearTimeout | A single delayed call. | 8 |
print, printAsBitmap | Print a clip’s frames as vectors or as bitmaps; PrintJob, from player 7, gives more control. | 4 |
printNum, printAsBitmapNum | Print a level. | 5 |
showRedrawRegions(on, colour) | Outlines the areas being redrawn, in the debug player. | 8 |
MMExecute(command) | Runs a Flash JavaScript API command, in a movie running inside the Flash program. | 7 |
asfunction:name,arg | A link protocol for HTML text that calls a function. | 5 |
The handlers on and onClipEvent are listed with the
functions in Adobe’s reference but are not functions; see
Events.
Deprecated functions
Deprecated since Flash Player 5, but still compiled: call,
chr (use String.fromCharCode), ord
(charCodeAt), int (Math.floor or
Math.ceil), length (String.length),
substring (String.substr), mbchr,
mbord, mblength, mbsubstring,
random (Math.random), toggleHighQuality
(_quality), ifFrameLoaded (_framesloaded) and
tellTarget (dot syntax).
Global properties and constants
| Name | Is | Player |
|---|---|---|
_global | The global object, holding the classes | 6 |
_root, _parent, this | Timeline and object references | 5 |
_levelN | The main timeline of level N | 4 |
_quality | "LOW", "MEDIUM", "HIGH" or "BEST" | 5 |
_focusrect | Whether the focus rectangle shows | 4 |
_soundbuftime | Seconds of streaming sound to buffer, 5 by default | 4 |
_accProps | Accessibility settings | 6.0.65 |
_highquality, maxscroll, scroll | Deprecated Flash 4 properties | 4 |
true, false, null, undefined, NaN, Infinity, -Infinity | Constants | 5 |
newline | A line break for text | 4 |