Sound.getPan( ) Method | Flash 5 |
retrieve the last pan value set |
A number indicating the last value set by setPan( ). Usually in the range of -100 (left channel on, right channel off) to 100 (right channel on, left channel off). Default value is 0 (left and right channels in equal proportions).
By adjusting the pan of a sound, you can create the illusion of a moving sound source. The getPan( ) method is used to determine the current distribution of the left and right channels of the sounds controlled by soundObject. Normally, getPan( ) is used in combination with setPan( ) to adjust the current pan of a sound.
Here we alter the pan of a sound by 20 towards the left channel:
mySound = new Sound(); mySound.setPan(mySound.getPan() - 20);
Sound.getTransform( ), Sound.setPan( )