Hello everyone,
I got a problem and I would like to share with you all. Maybe someone here could give me a little help about how to solve this.
I have a menu (mc_menu) and inside it 7 other movie clips that are the buttons.
Each button has the following code:
onClipEvent (load) {
function colorTween() {
for (i=0; i<3; i++) {
difference = endRGB*-startRGB*;
startRGB* = startRGB*+difference*0.150000;
}
// end of for
col.setRGB(startRGB[0] << 16 | startRGB[1] << 8 | startRGB[2]);
}
// End of the function
col = new Color(this);
startRGB = new Array(153, 0, 0);
endRGB = new Array(153, 0, 0);
// Sets the first, default _alpha value
this._alpha = 0;
// Stores its original _x position on a variable for later using
this.yOscale = 250;
// When the mouse moves over this movieclip, highlight and move it
this.onRollOver = function() {
// Makes it 100% opaque, on 0.5 seconds, using a linear transition
this.alphaTo(100,0.5,"linear");
// Moves it a bit down, on 1.6 seconds, using the default animation (easeoutexpo, standard deacceleration)
this.tween("_yscale",this.yOscale+400,1.6);
};
this.onRollOut = function() {
// Makes it 50% transparent again, on 0.4 seconds, using a linear transition
this.alphaTo(0,0.5,"linear");
// Moves it back to its original _x position, on 0.5 seconds, using the default animation again
this.tween("_yscale",this.yOscale,1.6);
};
}
onClipEvent (enterFrame) {
colorTween();
}
This code controls the over state of the buttons and changes its color.
I want to disable each button after clicked but of course enable again when other page is called. I can´t figure out how to do it.
Here´s the website I´m working on it.
http://www.laertjansen.com/juliana/
Thank you very much in advance for any sort of help.