Hi Guys n’ Girls
I’m having some trouble with some basic script that I’ve used successfully lots of times before. I have some movieclip ‘buttons’ embedded within a movieclip that is placed on the main timeline. I have added the following script to the timeline within the movieclip that contains the other buttons
button1_mc.onRelease = function(){
_root.gotoAndStop(3);
}
button2_mc.onRelease = function(){
_root.gotoAndStop(4);
}
button3_mc.onRelease = function(){
_root.gotoAndStop(5);
}
etc… At the moment I have no other script on the root timeline other than stop(); on the relevant frames. For some reason each button will work once and goes to the relevant frame, but once I try and press the buttons they stop functioning and will not let me go to any other frames. There is some code within each specific button
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false; //set variable (or switch) that decides wether ot not to play backwards…
play(); // play this movie clip… (grow the button(tween));
}
this.onRollOut = function(){
rewind = true; //set or rewind switch to true so it will play backwards…
}
this.onRelease = function(){
if (_parent._root._currentframe==2)
this.gotoAndStop(10);
}
this tells the buttons/ movieclips to do various things. I am wondering if this embedded script is interfering with the script in the parent file containing the buttons somehow? Any suggestions would be much appreciated! Even if it’s to help me tidy my script up.
thanks!