EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 186

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
186 Chapter 10: Working with External Data
Using fscommand()
Use the
fscommand() function to send a message to whichever program is hosting Flash Player.
The
fscommand() function has two parameters: command and arguments. To send a message to
the stand-alone version of Flash Player, you must use predefined commands and arguments. For
example, the following action sets the stand-alone player to scale the SWF file to the full monitor
screen size when the button is released:
on(release){
fscommand("fullscreen", "true");
}
The following table shows the values you can specify for the command and arguments parameters
of
fscommand() to control a SWF file playing in the stand-alone player (including projectors):
To u se
fscommand() to send a message to a scripting language such as JavaScript in a web
browser, you can pass any two parameters in the
command and arguments parameters. These
parameters can be strings or expressions and will be used in a JavaScript function that ā€œcatches,ā€
or handles, the
fscommand() function.
An
fscommand() function invokes the JavaScript function moviename_DoFSCommand in the
HTML page that embeds the SWF file, where
moviename is the name of Flash Player as assigned
by the
NAME attribute of the EMBED tag or the ID attribute of the OBJECT tag. If Flash Player is
assigned the name myMovie, the JavaScript function invoked is myMovie_DoFSCommand.
Command Arguments Purpose
quit
None Closes the projector.
fullscreen
true
or false Specifying true sets Flash Player to full-screen mode.
Specifying
false returns the player to normal menu view.
allowscale
true
or false Specifying false sets the player so that the SWF file is always
drawn at its original size and never scaled. Specifying
true
forces the SWF file to scale to 100% of the player.
showmenu
true
or false Specifying true enables the full set of context menu items.
Specifying
false dims all the context menu items except
Settings and About Flash Player.
exec
Path to
application
Executes an application from within the projector.

Table of Contents

Related product manuals