03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

sound in your SWF file.<br />

Stereo sounds divide the sound input evenly between the left <strong>and</strong> right speakers <strong>and</strong> have the<br />

following transform settings by default:<br />

ll = 100<br />

lr = 0<br />

rr = 100<br />

rl = 0<br />

Mono sounds play all sound input in the left speaker <strong>and</strong> have the following transform<br />

settings by default:<br />

ll = 100<br />

lr = 100<br />

rr = 0<br />

rl = 0<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Parameters<br />

transformObject:Object - An object created with the constructor for the generic Object<br />

class.<br />

Example<br />

The following example illustrates a setting that can be achieved by using setTransform(),<br />

but cannot be achieved by using setVolume() or setPan(), even if they are combined.<br />

The following code creates a new soundTransformObject object <strong>and</strong> sets its properties so<br />

that sound from both channels will play only in the left channel.<br />

var mySoundTransformObject:Object = new Object();<br />

mySoundTransformObject.ll = 100;<br />

mySoundTransformObject.lr = 100;<br />

mySoundTransformObject.rr = 0;<br />

mySoundTransformObject.rl = 0;<br />

To apply the soundTransformObject object to a Sound object, you then need to pass the<br />

object to the Sound object using setTransform() as follows:<br />

my_sound.setTransform(mySoundTransformObject);<br />

The following example plays a stereo sound as mono; the soundTransformObjectMono<br />

object has the following parameters:<br />

var mySoundTransformObjectMono:Object = new Object();<br />

mySoundTransformObjectMono.ll = 50;<br />

mySoundTransformObjectMono.lr = 50;<br />

mySoundTransformObjectMono.rr = 50;<br />

mySoundTransformObjectMono.rl = 50;<br />

1130 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!