Getvolume (Sound.getvolume Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

this.stopDrag();
updateTransformTxt();
}
function updateTransformTxt() {
var ll_num:Number = 30+100-knob_ll._y;
var lr_num:Number = 30+100-knob_lr._y;
var rl_num:Number = 30+100-knob_rl._y;
var rr_num:Number = 30+100-knob_rr._y;
my_sound.setTransform({ll:ll_num, lr:lr_num, rl:rl_num, rr:rr_num});
transform_mc.transform_txt.htmlText = "<textformat
tabStops='[0,30,60,90]'>";
transform_mc.transform_txt.htmlText +=
ll_num+"\t"+lr_num+"\t"+rl_num+"\t"+rr_num;
transform_mc.transform_txt.htmlText += "</textformat>";
}
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
setTransform (Sound.setTransform method)

getVolume (Sound.getVolume method)

public getVolume() : Number
Returns the sound volume level as an integer from 0 to 100, where 0 is off and 100 is full
volume. The default setting is 100.
Availability: ActionScript 1.0; Flash Player 5
Returns
- An integer.
Number
Example
The following example creates a slider using the Drawing API and a movie clip that is created
at runtime. A dynamically created text field displays the current volume level of the sound
playing in the SWF file. Add the following ActionScript to your AS or FLA file:
var my_sound:Sound = new Sound();
my_sound.loadSound("song3.mp3", true);
this.createEmptyMovieClip("knob_mc", this.getNextHighestDepth());
knob_mc.left = knob_mc._x;
knob_mc.right = knob_mc.left+100;
1104
ActionScript classes
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
method.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF