Actions, Functions, and Properties

The actions and properties described in this section can be thought of as methods and properties of the top-level movie. ActionScript also provides built-in functions for evaluating various expressions. These are described in the following tables:

Table D-8
Table D-9
Table D-10
Table D-8. ActionScript actions

Action name

Parameters

Description

call

frame

Switch the context from this script to the script attached to the specified frame.

delete

object

Delete (undefine) the specified object or variable.

duplicateMovieClip

movie_clip, new_name, depth

Create a new instance of the given MovieClip, place it at depth, and label it with new_name.

fscommand

command, argument_string

Pass a command and list of arguments to the system that is running the SWF user agent.

function

name { code_block }

Define a function.

getURL

url , window

Load a MovieClip from an external URL. The optional window parameter can be one of the following values:

_self

The current frame in the current window.

_blank

A new window.

_parent

The parent of the current frame.

_top

The top-level window.

gotoAndPlay

frame

Go to a particular frame and play the movie.

gotoAndStop

frame

Go to a particular frame and stop the movie.

loadMovie

url, target

Load an external movie from the specified URL. The target can be a path to an existing object in the movie (which will be replaced) or the depth at which the movie clip should be placed.

loadVariables

url, level

Load variable data from a text file or CGI script. The data will be read into ...

Get Perl Graphics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.