Introduction to Flash Lite 2.x ActionScript |
|
|
|
| Unsupported and Partially Supported Classes > Sound class | |||
ActionScript for Flash Lite 2.x supports device sound through the Sound class and through System.capabilities values. The Sound class is fully supported for native sounds supported in Flash Player 7, but it is only partially supported for device sounds.
Flash Lite 2.x adds support that lets you synchronize device sound playback with rendering animation.
|
NOTE |
Flash Lite 2.x does not support sound recording. |
The following table lists the methods that are partially supported by the Sound class for when using ActionScript for Flash Lite 2.x.
|
Method |
Description |
Support |
|---|---|---|
getPan()
|
Returns the pan level set in the last Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
Partially supported |
getTransform()
|
Returns the sound transform information for the specified Sound object set with the last Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
Partially supported |
loadSound()
|
Loads an MP3 file into a Sound object. You can use the Event sounds are completely loaded before they play. They are managed by the ActionScript Sound class and respond to all methods and properties of this class. Limitations: The streaming parameter is ignored when used with Flash Lite 2.x. |
Partially supported |
setPan()
|
Determines how the sound is played in the left and right channels (speakers). For mono sounds, pan determines which speaker (left or right) the sound plays through. Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
Partially supported |
setTransform()
|
Sets the sound transform (or balance) information, for a Sound object. The Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
Partially supported |
setVolume()
|
Sets the volume for the Sound object. Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
Partially supported |
The following table lists the properties of the Sound class that are partially supported when using ActionScript for Flash Lite 2.x.
|
Property |
Description |
|---|---|
duration
|
The duration of a sound, in milliseconds. Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
position
|
The number of milliseconds a sound has been playing. Limitations: Supported for use with native Flash sound; not supported for use with device sound. |
The following table lists new methods in the Sound class that are specific to ActionScript for Flash Lite 2.x.
|
Method |
Description |
|---|---|
getPan()
|
Returns the value of the previous |
getTransform()
|
Returns the value of the previous |
loadSound()
|
Loads sound data of any format into Flash Player. This method is different from the Flash Player 7 implementation because sound data loaded using this method is always treated as event sound. Therefore, the second parameter of this method is always ignored. In the following example, the value my_sound.loadSound("mysnd.mp3", true);
|
|
|
|
|