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
Availability: ActionScript 1.0; Flash Player 5
Parameters
- An object created with the constructor for the generic Object
transformObject:Object
class.
Example
The following example illustrates a setting that can be achieved by using
,
setTransform()
but cannot be achieved by using
or
, even if they are combined.
setVolume()
setPan()
The following code creates a new
object and sets its properties so
soundTransformObject
that 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
object to a Sound object, you then need to pass the
soundTransformObject
object to the Sound object using
as follows:
setTransform()
my_sound.setTransform(mySoundTransformObject);
The following example plays a stereo sound as mono; the
soundTransformObjectMono
object 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
object has the following parameters:
soundTransformObjectHalf
var mySoundTransformObjectHalf:Object = new Object();
mySoundTransformObjectHalf.ll = 50;
mySoundTransformObjectHalf.lr = 0;
mySoundTransformObjectHalf.rr = 100;
mySoundTransformObjectHalf.rl = 50;
my_sound.setTransform(mySoundTransformObjectHalf);
1114
ActionScript classes