I successfully created a volume slider in the main scene of my movie, but when I do a volume slider in an embeded movie clip, the slider button appears off the screen at 0 on the x axis. Any ideas how I can fix this within the movie clip? The code is below. Thanks in advance for the help.
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 load
}
//
onClipEvent(mouseDown) {
startDrag(this, false, left , top , right, bottom)
}
//
onClipEvent(mouseUp) {
this.stopDrag();
}
//
onClipEvent(enterFrame) {
// 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();
}
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 load
}
//
onClipEvent(mouseDown) {
startDrag(this, false, left , top , right, bottom)
}
//
onClipEvent(mouseUp) {
this.stopDrag();
}
//
onClipEvent(enterFrame) {
// 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();
}