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.

Example<br />

For a sample usage of this method, see Sound.getPan().<br />

See also<br />

attachSound (Sound.attachSound method), getPan (Sound.getPan method),<br />

setTransform (Sound.setTransform method), setVolume (Sound.setVolume<br />

method), start (Sound.start method)<br />

setTransform (Sound.setTransform method)<br />

public setTransform(transformObject:Object) : Void<br />

Sets the sound transform (or balance) information, for a Sound object.<br />

The soundTransformObject parameter is an object that you create using the constructor<br />

method of the generic Object class with parameters specifying how the sound is distributed to<br />

the left <strong>and</strong> right channels (speakers).<br />

Sounds use a considerable amount of disk space <strong>and</strong> memory. Because stereo sounds use twice<br />

as much data as mono sounds, it is generally best to use 22-KHz 6-bit mono sounds. You can<br />

use setTransform() to play mono sounds as stereo, play stereo sounds as mono, <strong>and</strong> to add<br />

interesting effects to sounds.<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 />

The properties for the soundTransformObject are as follows:<br />

11 - A percentage value that specifies how much of the left input to play in the left speaker (0-<br />

100).<br />

1r - A percentage value that specifies how much of the right input to play in the left speaker<br />

(0-100).<br />

rr - A percentage value that specifies how much of the right input to play in the right speaker<br />

(0-100).<br />

rl - A percentage value that specifies how much of the left input to play in the right speaker<br />

(0-100).<br />

The net result of the parameters is represented by the following formula:<br />

leftOutput = left_input ~ ll + right_input ~ lr<br />

rightOutput = right_input ~ rr + left_input ~ rl<br />

The values for left_input or right_input are determined by the type (stereo or mono) of<br />

sound in your SWF file.<br />

580 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!