Name
Sound.getPan( ) Method — retrieve the last pan value set
Availability
Flash 5
Synopsis
soundObject.getPan( )
Returns
A number indicating the last value set by setPan(
). Usually in the range -100 (left channel on, right
channel off) to 100 (right channel on, left channel off). Default
value is
(both left and right channels in equal proportions).
Description
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.
Example
Here we alter the pan of a sound by 20:
mySound = new Sound( ); mySound.setPan(mySound.getPan( ) - 20);
See Also
Sound.getTransform( ), Sound.setPan( )
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access