Sound.attachSound()
Availability
Flash Player 5.
Usage
my_sound.attachSound("idName":String) : Void
Parameters
The identifier of an exported sound in the library. The identifier is located in the
idName
Linkage Properties dialog box.
Returns
Nothing.
Description
Method; attaches the sound specified in the
sound must be in the library of the current SWF file and specified for export in the Linkage
Properties dialog box. You must call
To make sure that the sound can be controlled from any scene in the SWF file, place the sound on
the main Timeline of the SWF file.
Example
The following example attaches the sound
the linkage identifier
var my_sound:Sound = new Sound();
my_sound.attachSound("logoff_id");
my_sound.start();
750
Chapter 2: ActionScript Language Reference
Sound.start()
logoff_id
.
logoff_id
parameter to the specified Sound object. The
idName
to start playing the sound.
to
my_sound
. A sound in the library has
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers