Frames 

 No Frames

Previous Element
ShapeTransform

Next Element
SoundEnvelope


Sound

This defines a single sound element that can be used within the movie. This may be played using a PlaceSound element, attached to buttons using the ButtonSound element of a button or accessed using ActionScript if exported as a symbol. Currently all sounds stored in SWF movies can be used or any CBR MP3 sound. All sounds must have a sample rate of 5.5KHz, 11KHz, 22KHz or 44KHz. MP3 sounds sounds are restricted to 11KHz, 22KHz or 44KHz. If the rendered pitch and duration of a sound is not as expected then check the sampling rate of the input sounds.

Attributes

id A unique name for the symbol within the movie.
TypeString
format Optional informational attribute specifying the native format of the sound. Only 'Raw', 'MP3' and 'ADPCM' formats are supported below version 6.
ValuesMP3
ADPCM
Raw
RawPS
Nellymoser
Default ValueMP3
resourceType The type of file used to store the sound. An SWF file format is an SWF file in which the sound is already pre-processed and stored as SWF. Most commonly, this be be as a result of a previous SWF decompilation. Only MP3 sounds can be read from external file formats. If other sound formats are required to be streamed then they should be either converted to MP3 or imported into a Flash movie using another authoring tool and exported to a .SWF resource file.
ValuesExternal
SWF
Default ValueExternal
resourceLocation Identifier for this resource within the repository. For the default 'File' repository this indicated the file name within the sounds subdirectory.
TypeString
Default ValueNo default
sourceStartTime Optional attribute specifying the position within the sound at which to start. Position is specified in Milliseconds into the specified sound.
TypeInteger
Default Value0
duration Optional attribute specifying the duration, in milliseconds, of the sound.
TypeInteger
Default Value The duration of the timeline or the duration of the sound, whichever is less.
latency When sounds are converted to MP3 format by Flash, the decoder automatically creates all sounds with a predefined latency, representing the number of sound samples to be skipped. This latency cannot be retrieved by directly inspecting the MP3 produced as it is a property of the built-in transcoder. When the latency is not specified correctly, audible clicks or gaps may be heard when playing the sound. This attribute is not necessary for MP3 sounds created externally and should rarely need to be manually specified by a user.
TypeInteger
Default Value0
sampleCount When an MP3 sound extracted from an SWF has a defined latency, the number of sound samples present in the sound will differ from those implicitly defined by the MP3 format. When the latency attribute is non-zero, this attribute can be used to specify the actual number of defined samples in the sound. When the sampleCount is not specified correctly, audible clicks or gaps may be heard when playing the sound. This attribute is not necessary for MP3 sounds created externally and should rarely need to be manually specified by a user.
TypeInteger
Default ValueNo Default

Child Elements

Desc
Metadata

Parent Elements

Repository

Examples

ADPCM Sound Example
Simple MP3 Sound Example
Button Sound Example
Raw MP3 Example
Sound Envelope Example
Simple MP3 Sound From URL Example

Previous Element
ShapeTransform

Next Element
SoundEnvelope