MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1105

Actionscript 2.0 language reference
Table of Contents

Advertisement

knob_mc.top = knob_mc._y;
knob_mc.bottom = knob_mc._y;
knob_mc._x = my_sound.getVolume();
with (knob_mc) {
lineStyle(0, 0x000000);
beginFill(0xCCCCCC);
moveTo(0, 0);
lineTo(4, 0);
lineTo(4, 18);
lineTo(0, 18);
lineTo(0, 0);
endFill();
}
knob_mc.createTextField("volume_txt", knob_mc.getNextHighestDepth(),
knob_mc._width+4, 0, 30, 22);
knob_mc.volume_txt.text = my_sound.getVolume();
knob_mc.onPress = function() {
this.startDrag(false, this.left, this.top, this.right, this.bottom);
this.isDragging = true;
};
knob_mc.onMouseMove = function() {
if (this.isDragging) {
this.volume_txt.text = this._x;
}
}
knob_mc.onRelease = function() {
this.stopDrag();
this.isDragging = false;
my_sound.setVolume(this._x);
};
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
setVolume (Sound.setVolume method)
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
method.
Sound
1105

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents