Log in

View Full Version : Buttons to Stay Down??



lfollett
03-01-2008, 03:36 AM
I am creating a header for a website and I want the buttons to stay in the downstate after click, until another one is clicked (not until another is mouseover). I am using MC for buttons. Here is the action script I have for one of the buttons. Can anyone tell me what I am doing wrong?

Also, is there anyway for the button to stay in the down state once referred to the next page without using a frame?


//End Terms; Begin Links

this.linksMC.onRollOver = function(){
linksMC.gotoAndPlay("_over");
}


this.linksMC.onRollOut = function() {
linksMC.gotoAndPlay("_out");
}

this.linksMC.onRelease = function() {
linksMC.gotoAndStop(9);
getURL("http://mydomain.com/links.html");
}

BLiZZaRD
03-01-2008, 06:16 PM
Simple if else's will work, depends on how many buttons you have, you may be better with an array.
Also use on press to get your URL, then it will stay better.



this.linksMC.onPress = function() {
linksMC.gotoAndStop(9);
getURL("http://mydomain.com/links.html");
}


for an if/else you can try simple things like:



if (the other button name._currentframe >= 2){
this.gotoAndStop(1);
}


As for your other question... sure, if you are using the same exact movie on the page. Although I will admit I don't fully understand what you mean by that.