Domain (Localconnection.domain Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

SWF 2 contains a button called
and passes two variables. The first variable contains the MP3 file to stream, and the second
variable is the filename that you display in the Label component instance in SWF 1.
play_btn.onRelease = function() {
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("lc_name", "playMP3", "song1.mp3", "Album - 01 - Song");
};
SWF 3 contains a button called
and passes two variables. The first variable contains the MP3 file to stream, and the second
variable is the filename that you display in the Label component instance in SWF 1.
play_btn.onRelease = function() {
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("lc_name", "playMP3", "song2.mp3", "Album - 02 - Another
Song");
};
The
MovieClip.getNextHighestDepth()
Player 7 or later. If your SWF file includes a version 2 component, use the version 2
components DepthManager class instead of the
method.
See also
send (LocalConnection.send method)
,
handler)

domain (LocalConnection.domain method)

domain (LocalConnection.domain method)
public domain() : String
Returns a string representing the domain of the location of the current SWF file.
In SWF files published for Flash Player 6, the returned string is the superdomain of the
current SWF file. For example, if the SWF file is located at www.macromedia.com, this
command returns
"macromedia.com"
In SWF files published for Flash Player 7 or later, the returned string is the exact domain of
the current SWF file. For example, if the SWF file is located at www.macromedia.com, this
command returns
"www.macromedia.com"
If the current SWF file is a local file residing on the client computer, this command returns
.
"localhost"
722
ActionScript classes
. When you click the button, it connects to SWF 1
play_btn
. When you click the button, it connects to SWF 1
play_btn
method used in these examples requires Flash
MovieClip.getNextHighestDepth()
,
allowDomain (LocalConnection.allowDomain
.
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents