Sending Messages To And From Flash Player - MACROMEDIA FLASH MX 2004-USING ACTIONSCRIPT IN FLASH Use Manual

Using actionscript in flash
Hide thumbs Also See for FLASH MX 2004-USING ACTIONSCRIPT IN FLASH:
Table of Contents

Advertisement

theSocket.send(myXML);
}
//button sends data
sendButton.onRelease = function() {
sendData();
};
//traces data returned from socket connection
theSocket.onData = function(msg:String):Void {
trace(msg);
};
For more information, see the "XMLSocket class" entry in Flash ActionScript Language Reference.

Sending messages to and from Flash Player

To send messages from a SWF file to its host environment (for example, a web browser, a
Macromedia Director movie, or the stand-alone Flash Player), you can use the
function. This function lets you extend your SWF file by using the capabilities of the host. For
example, you could pass an
that opens a new browser window with specific properties.
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 example, you could have a link in an
HTML page that sends your SWF file to a specific frame.For more information, see the following
topics:
"Using fscommand()" on page 285
"About Flash Player methods" on page 287
"About using JavaScript to control Flash applications" on page 288
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);
};
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:
function to a JavaScript function in an HTML page
and
command
arguments
Sending messages to and from Flash Player
fscommand()
. To send a message to
285

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents