MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 689

Actionscript language reference
Table of Contents

Advertisement

function releaseKnob() {
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>";
}
See Also
Sound.setTransform()
Sound.getVolume()
Availability
Flash Player 5.
Usage
my_sound.getVolume() : Number
Parameters
None.
Returns
An integer.
Description
Method; 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.
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;
knob_mc.top = knob_mc._y;
Sound.getVolume()
689

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flex

Table of Contents