MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 699

Actionscript language reference
Table of Contents

Advertisement

Mono sounds play all sound input in the left speaker and have the following transform settings
by default:
ll = 100
lr = 100
rr = 0
rl = 0
Example
The following example illustrates a setting that can be achieved by using
cannot be achieved by using
The following code creates a new
sound from both channels will play only in the left channel.
var mySoundTransformObject:Object = new Object();
mySoundTransformObject.ll = 100;
mySoundTransformObject.lr = 100;
mySoundTransformObject.rr = 0;
mySoundTransformObject.rl = 0;
To apply the
soundTransformObject
to the Sound object using
my_sound.setTransform(mySoundTransformObject);
The following example plays a stereo sound as mono; the
has the following parameters:
var mySoundTransformObjectMono:Object = new Object();
mySoundTransformObjectMono.ll = 50;
mySoundTransformObjectMono.lr = 50;
mySoundTransformObjectMono.rr = 50;
mySoundTransformObjectMono.rl = 50;
my_sound.setTransform(mySoundTransformObjectMono);
This example plays the left channel at half capacity and adds the rest of the left channel to the
right channel; the
soundTransformObjectHalf
var mySoundTransformObjectHalf:Object = new Object();
mySoundTransformObjectHalf.ll = 50;
mySoundTransformObjectHalf.lr = 0;
mySoundTransformObjectHalf.rr = 100;
mySoundTransformObjectHalf.rl = 50;
my_sound.setTransform(mySoundTransformObjectHalf);
var mySoundTransformObjectHalf:Object = {ll:50, lr:0, rr:100, rl:50};
Also see the example for
See also
Object
class,
Sound.getTransform()
or
setVolume()
setPan()
soundTransformObject
object to a Sound object, you then need to pass the object
as follows:
setTransform()
Sound.getTransform()
, even if they are combined.
object and sets its properties so that
soundTransformObjectMono
object has the following parameters:
.
Sound.setTransform()
, but
setTransform()
object
699

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents