Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > 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()).
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
Array |
Creates a new, empty array or converts specified elements to an array. |
|
|
asfunction |
A special protocol for URLs in HTML text fields that allows an HREF link to call an ActionScript function. |
|
|
Boolean |
Converts the parameter expression to a Boolean value and returns |
|
|
call |
Deprecated since Flash Player 5. This action was deprecated in favor of the Executes the script in the called frame without moving the playhead to that frame. |
|
|
chr |
Deprecated since Flash Player 5. This function was deprecated in favor of Converts ASCII code numbers to characters. |
|
|
clearInterval |
Stops the |
|
|
duplicateMovieClip |
Creates an instance of a movie clip while the SWF file is playing. |
|
|
escape |
Converts the parameter to a string and encodes it in a URL-encoded format, where all nonalphanumeric characters are replaced with % hexadecimal sequences. |
|
|
eval |
Accesses variables, properties, objects, or movie clips by name. |
|
|
fscommand |
Lets the SWF file communicate with either Flash Player or the program hosting Flash Player, such as a web browser. |
|
|
getProperty |
Returns the value of the specified property for the movie clip my_mc. |
|
|
getTimer |
Returns the number of milliseconds that have elapsed since the SWF file started playing. |
|
|
getURL |
Loads a document from a specific URL into a window or passes variables to another application at a defined URL. |
|
|
Returns a string containing Flash Player version and platform information. |
|
|
|
gotoAndPlay |
Sends the playhead to the specified frame in a scene and plays from that frame. |
|
|
gotoAndStop |
Sends the playhead to the specified frame in a scene and stops it. |
|
|
ifFrameLoaded |
Deprecated since Flash Player 5. This function has been deprecated. Macromedia recommends that you use the Checks whether the contents of a specific frame are available locally. |
|
|
int |
Deprecated since Flash Player 5. This function was deprecated in favor of Converts a decimal number to an integer value by truncating the decimal value. |
|
|
isFinite |
Evaluates expression and returns |
|
|
isNaN |
Evaluates the parameter and returns |
|
|
length |
Deprecated since Flash Player 5. This function, along with all the string functions, has been deprecated. Macromedia recommends that you use the methods of the String class and the Returns the length of the specified string or variable. |
|
|
loadMovie |
Loads a SWF or JPEG file into Flash Player while the original SWF file plays. |
|
|
loadMovieNum |
Loads a SWF or JPEG file into a level in Flash Player while the originally loaded SWF file plays. |
|
|
loadVariables |
Reads data from an external file, such as a text file or text generated by ColdFusion, a CGI script, Active Server Pages (ASP), PHP, or Perl script, and sets the values for variables in a target movie clip. |
|
|
loadVariablesNum |
Reads data from an external file, such as a text file or text generated by a ColdFusion, CGI script, ASP, PHP, or Perl script, and sets the values for variables in a Flash Player level. |
|
|
mbchr |
Deprecated since Flash Player 5. This function was deprecated in favor of the Converts an ASCII code number to a multibyte character. |
|
|
mblength |
Deprecated since Flash Player 5. This function was deprecated in favor of the methods and properties of the String class. Returns the length of the multibyte character string. |
|
|
mbord |
Deprecated since Flash Player 5. This function was deprecated in favor of Converts the specified character to a multibyte number. |
|
|
mbsubstring |
Deprecated since Flash Player 5. This function was deprecated in favor of Extracts a new multibyte character string from a multibyte character string. |
|
|
MMExecute |
Lets you issue Flash JavaScript API (JSAPI) commands from ActionScript. |
|
|
Sends the playhead to the next frame. |
|
|
|
Sends the playhead to Frame 1 of the next scene. |
|
|
|
Number |
Converts the parameter expression to a number. |
|
|
Object |
Creates a new empty object or converts the specified number, string, or Boolean value to an object. |
|
|
on |
Specifies the mouse event or keypress that triggers an action. |
|
|
onClipEvent |
Triggers actions defined for a specific instance of a movie clip. |
|
|
ord |
Deprecated since Flash Player 5. This function was deprecated in favor of the methods and properties of the String class. Converts characters to ASCII code numbers. |
|
|
parseFloat |
Converts a string to a floating-point number. |
|
|
parseInt |
Converts a string to an integer. |
|
|
play |
Moves the playhead forward in the Timeline. |
|
|
Sends the playhead to the previous frame. |
|
|
|
Sends the playhead to Frame 1 of the previous scene. |
|
|
|
print |
Prints the |
|
|
printAsBitmap |
Prints the |
|
|
printAsBitmapNum |
Prints a level in Flash Player as a bitmap according to the boundaries specified in the parameter ( |
|
|
printNum |
Prints the level in Flash Player according to the boundaries specified in the |
|
|
random |
Deprecated since Flash Player 5. This function was deprecated in favor of Returns a random integer between 0 and one less than the integer specified in the <code><em>value</em></code> parameter. |
|
|
removeMovieClip |
Deletes the specified movie clip. |
|
|
setInterval |
Calls a function or a method of an object at periodic intervals while a SWF file plays. |
|
|
setProperty |
Changes a property value of a movie clip as the movie clip plays. |
|
|
showRedrawRegions |
Provides the ability for the debugger player to outline the regions of the screen that are being redrawn. |
|
|
startDrag |
Makes the target movie clip draggable while the movie plays. |
|
|
stop |
Stops the SWF file that is currently playing. |
|
|
Stops all sounds currently playing in a SWF file without stopping the playhead. |
|
|
|
stopDrag |
Stops the current drag operation. |
|
|
String |
Returns a string representation of the specified parameter. |
|
|
substring |
Deprecated since Flash Player 5. This function was deprecated in favor of Extracts part of a string. |
|
|
targetPath |
Returns a string containing the target path of movieClipObject. |
|
|
tellTarget |
Deprecated since Flash Player 5. Macromedia recommends that you use dot (.) notation and the Applies the instructions specified in the statements parameter to the Timeline specified in the target parameter. |
|
|
Deprecated since Flash Player 5. This function was deprecated in favor of Turns anti-aliasing on and off in Flash Player. |
|
|
|
trace |
Evaluates the expression and outputs the result. |
|
|
unescape |
Evaluates the parameter x as a string, decodes the string from URL-encoded format (converting all hexadecimal sequences to ASCII characters), and returns the string. |
|
|
unloadMovie |
Removes a movie clip that was loaded by means of |
|
|
unloadMovieNum |
Removes a SWF or image that was loaded by means of |
|
|
Updates the display when you call it within an handler or using |
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001717.html
Comments
Francis Cheng said on Sep 13, 2005 at 11:57 AM : maciekw said on Sep 15, 2005 at 8:52 AM : maciekw said on Sep 16, 2005 at 2:47 AM : paulneave said on Sep 16, 2005 at 7:20 AM : dwabyick said on Nov 22, 2005 at 12:06 PM : Southern Sun said on Feb 25, 2006 at 7:15 PM : Captain James said on Apr 7, 2006 at 8:54 AM : bribishop@hotmail.com said on Jan 29, 2007 at 3:45 PM :