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
.
NO
TE
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.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...