onClipEvent(load) {
this._x=_root.hbase._x + _root.hbase._width/2 - this._width/2;
left=this._x - _root.hbase._width/2;
top=this._y;
right=this._x + _root.hbase._width/2;
bottom=this._y;
volCalc=_root.hslider._x - _root.hbase._width/2
//
//End of Clip Event Load
}
onClipEvent(enterFrame) {
this.onPress = function () {
startDrag(this, false, left , top , right, bottom)
}
this.onRelease = function () {
this.stopDrag();
}
// This constantly sets the current a-axis position of
//the slider to "sliderx
sliderx=_root.hslider._x; //Sets sliderx as variable for a-axis of slider
myMusicVolume=(sliderx-volCalc); //The value of x-axis load value - n = 50
_root.myMusic.setVolume(myMusicVolume);
_root.currentVolume="Volume " + _root.myMusic.getVolume();
} |