Flash scripting question
Flash scripting question
- Started
- Last post
- 4 Responses
- omg0
//header
onclick
allButtonHighlights=0;
this.button.highlight=true;
- mikotondria30
I would use standard movie clips 'as' the buttons, and control what frame they were on. Buttons didn't always want to behave afair...
- fyoucher10
Turn em into movieclips, stop frame on 1st frame.
Then use variables and have your button code check them:
var currentButton:Movieclip;
btn1.onRelease() = function:Void {
//This is the 1st time a button is pressed
if (currentButton == undefined ) {
currentButton = this;
this.gotoAndStop(2); //over state
return();} else {
currentButton.gotoAndStop(1); // previous button back to default
this.gotoAndStop(2);
}
}Then fill in the rest of the button code
- or change that entire thing into a reusable function / method...fyoucher1
- moldero0
- Sometimes, I do too. Great for just jamming in, multiple ways of approaching problems. Other times it just wouldnt f**g work!mikotondria3