EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 664

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 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...
664 Working with External Data
The following table shows the values you can specify for the command and arguments
parameters of
fscommand() to control the playback and appearance of a SWF file playing in
the stand-alone player, including projectors.
To use
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 are 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 the
SWF file is assigned the name
myMovie, the JavaScript function invoked is
myMovie_DoFSCommand.
To use fscommand() to open a message box from a SWF file in the HTML page
through JavaScript:
1. Create a new FLA file, and save it as myMovie.fla.
2. Drag two instances of the Button component to the Stage and give them the instance
names window_btn and alert_btn, respectively, and the labels Open Window and Alert.
3. Insert a new layer on the Timeline, and rename it Actions.
NOTE
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 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