386
Chapter 12: ActionScript Dictionary
Usage 1: To send a message to Flash Player, you must use predefined commands and parameters.
The following table shows the values you can specify for the
command
and
parameters
parameters of the
fscommand
action to control a SWF file playing in Flash Player
(including projectors):
The
exec
command can contain only the characters A–Z, a–z, 0–9, period ()., and underscore
(_). The
exec
command runs in the subdirectory fscommand only. In other words, if you use the
fscommand exec
command to call an application, the application must reside in a subdirectory
named fscommand.
Usage 2: To use the
fscommand
action 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
parameters
parameters.
These parameters can be strings or expressions and are used in a JavaScript function that
“catches,” or handles, the
fscommand
action.
In a web browser, the
fscommand
action calls the JavaScript function
moviename_DoFScommand
in the HTML page containing the SWF file. The
moviename
is the name of the Flash Player as
assigned by the
NAME
attribute of the
EMBED
tag or the ID property of the
OBJECT
tag. If you
assign the Flash Player the name
myDocument
, the JavaScript function called is
myDocument_DoFScommand
.
Usage 3: The
fscommand
action can send messages to Macromedia Director that are interpreted
by Lingo as strings, events, or executable Lingo code. If the message is a string or an event, you
must write the Lingo code to receive the message from the
fscommand
action and carry out an
action in Director. For more information, see the Director Support Center at
www.macromedia.com/support/director
.
Usage 4: In Visual Basic, Visual C++, and other programs that can host ActiveX
controls, fscommand sends a VB event with two strings that can be handled in the environment’s
programming language. For more information, use the keywords
Flash method
to search the Flash
Support Center at
www.macromedia.com/support/flash
.
Command
Parameters
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 About
Flash Player.
exec
Path to
application
Executes an application from within the projector.
trapallkeys
true
or
false
Specifying
true
sends all key events, including accelerator keys,
to the
onClipEvent(keyDown/keyUp)
handler in Flash Player.
Содержание FLASH MX 2004 - ACTIONSCRIPT
Страница 1: ...ActionScript Reference Guide...
Страница 8: ...8 Contents...
Страница 12: ......
Страница 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Страница 54: ...54 Chapter 2 ActionScript Basics...
Страница 80: ...80 Chapter 3 Writing and Debugging Scripts...
Страница 82: ......
Страница 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Страница 112: ......
Страница 120: ...120 Chapter 6 Using the Built In Classes...
Страница 176: ......
Страница 192: ...192 Chapter 10 Working with External Data...
Страница 202: ...202 Chapter 11 Working with External Media...
Страница 204: ......
Страница 782: ...782 Chapter 12 ActionScript Dictionary...
Страница 793: ...Other keys 793 221 222 Key Key code...
Страница 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Страница 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Страница 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Страница 816: ...816 Index...