Setvolume (Sound.setvolume Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example illustrates a setting that can be achieved by using
but cannot be achieved by using
The following code creates a new
that sound from both channels plays in the left channel only .
var mySoundTransformObject:Object = new Object();
mySoundTransformObject.ll = 100;
mySoundTransformObject.lr = 100;
mySoundTransformObject.rr = 0;
mySoundTransformObject.rl = 0;
To apply the
soundTransformObject
object to the Sound object using
my_sound.setTransform(mySoundTransformObject);
The following example plays a stereo sound as mono; the
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
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};
See also
,
Object
getTransform (Sound.getTransform method)

setVolume (Sound.setVolume method)

public setVolume(value:Number) : Void
Sets the volume for the Sound object.
Availability: ActionScript 1.0; Flash Lite 2.0
or
setVolume()
setPan()
soundTransformObject
object to a Sound object, you then need to pass the
as follows:
setTransform()
object has the following parameters:
setTransform()
, even if they are combined.
object and sets its properties so
soundTransformObjectMono
,
Sound
615

Advertisement

Table of Contents
loading

Table of Contents