Now that I have more timeline sound I found this stop/start sound don't work for me. Now that I have the following main code
Code:
onClipEvent (load) {
allSound=new Sound();
allSound.setVolume(0);
_root.volume = 70;
}
onClipEvent (enterFrame) {
allSound.setVolume(_root.volume);
}
and code for the slider
Code:
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};
};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;
I decided to set stop/play buttons to controll the volume like this
Code:
on (release) {
_root.mySlider.dragger._x = 0;
gotoAndStop(2);
}
for stop
and respectively
Code:
on (release) {
_root.mySlider.dragger._x = 50;
gotoAndStop(1);
}
for play.
Now it works just fine, except one problem:
When the movie loads, you have to click on the slider first, to make the buttons work.
Please help on this, I'm really a newbie on this, and I'm not sure what should I do now!?!
10x