Name
fscommand( ) Global Function — send a message to the standalone Playeror to the Player’s host application
Availability
Flash
3
and later (enhanced in Flash 5 to
include trapallkeys)
Synopsis
fscommand(command, arguments)
Arguments
- command
A string passed to the host application, often the name of a JavaScript function.
- arguments
A string passed to the host application, often an argument to the function named by
command.
Description
With the fscommand( ) function, a Flash movie
can communicate with the standalone Player or with the Player’s
host application—the environment in which the Flash Player is
running (e.g., a web browser or Macromedia Director). The
fscommand( ) function is typically used in one
of three ways:
To send one of a limited set of built-in commands to the standalone Flash Player
To send commands to a scripting language such as JavaScript or VBScript in a web browser
To communicate with Lingo in a Macromedia Director movie
When used with the standalone Player, fscommand(
) takes one of the built-in sets of command/argument pairs, as shown in
Table 20.5.
Table 20-5. command/argument Pairs in Standalone Player
|
Command |
Argument |
Description |
|---|---|---|
|
|
|
When |
|
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access