I’ve got a simple vertical volume slider working, now I want to convert it to a horizontal one. The code on the button won’t change.
on (press) {
startDrag ("", false, left, top, right, bottom);
dragging = true;
}
on (release, releaseOutside) {
stopDrag ();
dragging = false;
}
But this needs to change and I’ve tried swapping things around. The obvious things are that the _x property needs to change. I’ve tried changing the direction with + instead of minus. I can get it to work, but the volume is loudest on the left side of the slider and lowest on the right side. I need to reverse that situation.
onClipEvent (load) {
top = _y;
left = _x;
right = _x;
bottom = _y+100;
}
onClipEvent (enterFrame) {
if (dragging == true) {
_root.s.setVolume(100-(_y-top));
}
}
Any ideas?