flash buttons in down state
Out of context: Reply #5
- Started
- Last post
- 8 Responses
- fusion410
You could place a button in a movie clip that has two frames labeled "on" and "off". Clicking calls a function which runs through a for/next loop that turns all the buttons in the series to "off" then turns the selected button "on". If you want your can also place your button commands within this function.
Here is the function. Put it on the root timeline at frame 1
// numButtons is the number of buttons in your movie.
// callingClip is the instance of the button clicked
function setButton(callingClip, numButtons){for ( i=1; i <= numButtons; i++ ) {
// turn all the buttons off
eval("pathToButton.button" + i).gotoAndStop("off");
}
// turn selected button on
callingClip.gotoAndStop("on");}
All your buttons MC’s would be named.
button1
button2
button3
etc.The function call on your buttons would read like this
on (release) {
//_root.setButton(this, insert number of buttons here);
}hope this helps