03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Usage 2: The following example uses a named function:<br />

function callback1() {<br />

trace("mySoundID completed");<br />

}<br />

var my_sound:Sound = new Sound();<br />

my_sound.attachSound("mySoundID");<br />

my_sound.onSoundComplete = callback1;<br />

my_sound.start();<br />

See also<br />

onLoad (Sound.onLoad h<strong>and</strong>ler)<br />

position (Sound.position property)<br />

public position : Number [read-only]<br />

The number of milliseconds a sound has been playing. If the sound is looped, the position is<br />

reset to 0 at the beginning of each loop.<br />

Note: Flash Lite 2.0 supports this property for native Flash sound only. The sound formats<br />

that are specific to a host device are not supported.<br />

Example<br />

For a sample usage of this property, see Sound.duration.<br />

See also<br />

duration (Sound.duration property)<br />

setPan (Sound.setPan method)<br />

public setPan(value:Number) : Void<br />

Determines how the sound is played in the left <strong>and</strong> right channels (speakers). For mono<br />

sounds, pan determines which speaker (left or right) the sound plays through.<br />

Note: Flash Lite 2.0 supports this method for native Flash sound only. The sound formats<br />

that are specific to a host device are not supported.<br />

Parameters<br />

value:Number - An integer specifying the left-right balance for a sound. The range of valid<br />

values is -100 to 100, where -100 uses only the left channel, 100 uses only the right channel,<br />

<strong>and</strong> 0 balances the sound evenly between the two channels.<br />

Sound 579

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!