Ok I need some serious help. I need to make the buttons that are associated with this code, toggle, so once you press them they become greyed out. So I was thinking of after you press a button, the alpha is reduced to 40%. Can someone help me place that piece of code into this monster? -I know it should go into the presto function of my script.
Something like… this._alpha =40;
Which works fine, but then it stays at 40%alpha after the user click on a different button.
I need it to toggle off once someone clicks on the next button.
Thanks,
-M
myarray = [];
btnarray = [];
var count = 0;
var p = mc1.mc.createEmptyMovieClip("p", 1);
var q = mc2.mc.createEmptyMovieClip("p", 1);
mc = mc1;
oldmc = mc2;
//you would get this from xml -easy peasy
for (var i = 1; i<8; i++) {
myarray.push("http://www.pairdesign.net/clients/Don_Satterlee/images/corporate/p"+i+".jpg");
this["btn"+i].ivar = i-1;
this["btn"+i].onPress = presto;
btn1.onPress()
btnarray.push(this["btn"+i]);
}
function checkload() {
onEnterFrame = function () {
if (mc.mc.p._width) {
mc.swapDepths(oldmc);
mc.gotoAndPlay(2);
delete this.onEnterFrame;
var myvar = mc;
mc = oldmc;
oldmc = myvar;
mc.onEnterFrame = fade
}
};
}
function fade(){
if(this._alpha>0){
this._alpha -=25
}else{
this._alpha = 0
delete this.onEnterFrame
}
}
function f() {
mc._alpha = 100
mc.mc.p.loadMovie(myarray[count]);
checkload();
count++;
count %= myarray.length;
}
function presto() {
for (var i = 0; i<btnarray.length; i++) {
btnarray*.enabled = true;
}
this.enabled = false;
count = this.ivar;
f();
}