MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 73

Actionscript language reference
Table of Contents

Advertisement

To control a SWF file in Flash Player from web browser scripting languages such as JavaScript,
VBScript, and Microsoft JScript, you can use Flash Player methods—functions that send
messages from a host environment to the SWF file. For more information, see Developing Flex
Applications.
For more information, see the following topics:
"Using fscommand()" on page 73
"About using JavaScript to control Flash applications" on page 74
Using fscommand()
You use the
fscommand()
Player, such as a web browser.
Note: Using
fscommand
the Macintosh.
The
fscommand()
the stand-alone version of Flash Player, you must use predefined commands and arguments. For
example, the following event handler sets the stand-alone player to scale the SWF file to the full
monitor screen size when the button is released:
my_btn.onRelease = function() {
fscommand("fullscreen", true);
};
The following table shows the values you can specify for the
of
fscommand()
player, including projectors. (A projector is a SWF file saved in a format that can run as a stand-
alone application—that is, embedding Flash Player with your content in an executable file.)
Command
quit
fullscreen
allowscale
showmenu
exec
To use
fscommand()
browser, you can pass any two parameters in the
parameters can be strings or expressions and will be used in a JavaScript function that "catches,"
or handles, the
fscommand()
function to send a message to whichever program is hosting Flash
to call Javascript does not work on the Safari or Internet Explorer browsers for
function has two parameters:
to control the playback and appearance of a SWF file playing in the stand-alone
Arguments
Purpose
None
Closes the projector.
or
Specifying
true
false
Specifying
or
Specifying
true
false
drawn at its original size and never scaled. Specifying
forces the SWF file to scale to 100% of the player.
or
Specifying
true
false
Specifying
Settings and About Flash Player.
Path to
Executes an application from within the projector.
application
to send a message to a scripting language such as JavaScript in a web
function.
and
command
arguments
command
sets Flash Player to full-screen mode.
true
returns the player to normal menu view.
false
sets the player so that the SWF file is always
false
enables the full set of context menu items.
true
dims all the context menu items except
false
and
command
arguments
Sending messages to and from Flash Player
. To send a message to
and
parameters
arguments
true
parameters. These
73

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents