Sound.getVolume()
689
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.ht=
"\t"+"\t"+"\t"+rr_num;
transform_mc.transform_txt.ht= "</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;
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...