User Guide
Sound 603
You can use the following example to start the device sound. Because Flash Lite does not
support streaming sound, it is a good practice to load the sound before playing it.
var my_sound:Sound = new Sound();
my_sound.onLoad = function(success) {
if (success) {
my_sound.start();
} else {
output.text = "loading failure";
}
};
my_sound.loadSound("song1.mp3",false);
See also
setPan (Sound.setPan method)
getTransform (Sound.getTransform method)
public getTransform() : Object
Returns the sound transform information for the specified Sound object set with the last
Sound.setTransform() call.
Note: Flash Lite 2.0 supports this method for native Flash sound only. The sound formats
that are specific to a host device are not supported.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
Object - An object with properties that contain the channel percentage values for the
specified sound object.
Example
The following example attaches four movie clips from a symbol in the library (linkage
identifier:
knob_id) that are used as sliders (or knobs) to control the sound file that loads into
the SWF file. These sliders control the transform object, or balance, of the sound file. For
more information, see the entry for
Sound.setTransform(). Add the following ActionScript
to your FLA or AS file:
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", true);
var transform_obj:Object = my_sound.getTransform();
this.createEmptyMovieClip("transform_mc", this.getNextHighestDepth());
transform_mc.createTextField("transform_txt",
transform_mc.getNextHighestDepth, 0, 8, 120, 22);