Attachsound (Sound.attachsound Method); Duration (Sound.duration Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Methods inherited from class Object
addProperty (Object.addProperty
(Object.hasOwnProperty
(Object.isPropertyEnumerable
method),
registerClass (Object.registerClass
(Object.toString
(Object.valueOf
method),

attachSound (Sound.attachSound method)

public attachSound(id:String) : Void
Attaches the sound specified in the
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.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- The identifier of an exported sound in the library. The identifier is located in the
id:String
Linkage Properties dialog box.
Example
The following example attaches the sound
has the linkage identifier
var my_sound:Sound = new Sound();
my_sound.attachSound("logoff_id");
my_sound.start();

duration (Sound.duration property)

public duration :
The duration of a sound, in milliseconds.
Note: Flash Lite 2.0 supports this property for native Flash sound only. The sound formats
that are specific to a host device are not supported.
Availability: ActionScript 1.0; Flash Lite 2.0
598
ActionScript classes
method),
method),
isPropertyEnumerable
method),
method),
unwatch (Object.unwatch
watch (Object.watch method)
parameter to the specified Sound object. The sound
id
Sound.start()
.
logoff_id
Number
[read-only]
hasOwnProperty
isPrototypeOf (Object.isPrototypeOf
method),
method),
to start playing the sound.
to
logoff_id
my_sound
toString
valueOf
. A sound in the library

Advertisement

Table of Contents
loading

Table of Contents