Name
Sound.setTransform( ) Method — distribute the left and right channels between the left and right speakers
Availability
Flash 5
Synopsis
soundObject.setTransform(transformObject)
Arguments
- transformObject
A user-defined object that specifies new channel settings as a series of properties.
Description
The setTransform( )
method gives us precise
control over how the channels in a sound are output to the left and
right speakers. In principle, setTransform( )
is
not unlike setPan( )
, but it provides more
detailed sound control over stereo sounds.
A stereo sound
is a combination of two distinct sounds—the left
channel and the right
channel—which are normally sent separately to the
left and right speakers. However, using setTransform(
)
, we may dictate how much of each channel is broadcast in
each speaker. We may, for example, say, “Play half of the left
channel in the left speaker, none of the left channel in the right
speaker, and all of the right channel in both speakers.” Or we
may say, “Play all of the left and right channels in the left
speaker.”
To use setTransform( )
, we must first create an
object with a series of predefined properties. The properties express
how to distribute the left and right channels of a stereo sound
between the left and right speakers, as described in Table 20.12.
Table 20-12. Properties of a transformO
bject
Property Name |
Property Value |
Property Description |
---|---|---|
|
0 to 100 |
The percentage of the left channel to play in the left speaker |
|
0 to 100 |
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.