Hello!
I am trying to make my buttons do this (<-- Link). What I can’t figure out is how to make the button stay red after the user clicks it and then go back to white when the user click on another button. Here is [URL=“http://www.geocities.com/flash4storage/PhotoGallery.swf”]my file (<-- Link) so far. and here is my Code:
var fade = false;
var depth = 1000;
var buttonNames = new Array("1", "2", "3", "4", "5");
for (var x = 0; x < buttonNames.length; x++) {
var newButton = this.attachMovie("theButton", "button" + x, depth++);
newButton._x = 35;
newButton._y = 35 + ((newButton._height + 17) * x);
newButton.text_mc.dynamic_txt.text = buttonNames[x];
newButton.onRollOver = function() { fade = true; }
newButton.onRollOut = function() { fade = false; }
Inside the newButton movie clip is this code:
stop();
var fade = false;
this.onEnterFrame = function() {
if (fade == true) {
this.nextFrame();
} else {
this.prevFrame();
}
}
this.onRollOver = function() { fade = true; }
this.onRollOut = function() { fade = false; }
So if anyone can help me figure out how to make the code remember what button you are on (such as the .swf in the first link) that would be awesome. Thanks!
-Loren :thumb: