mgd2004
05-24-2004, 09:03 AM
I'm looking for an easy way to set have 55 buttons perform the same onRollOver and onRollOut functions. Basically, when the movieClip that is acting as button is rolledOver, I want the alpha to change to 80, when it's rolledOut, I want the alpha back to 20.
Here's what I have so far... Any help would be greatly appreciated.
// Create movieClip ARRAY
movieClip_array = new Array ();
movieClip_array[0] = btn_step0_mc;
movieClip_array[1] = btn_step1_mc;
movieClip_array[2] = btn_step2_mc;
movieClip_array[3] = btn_step3_mc;
movieClip_array[4] = btn_step4_mc;
movieClip_array[5] = btn_step5_mc;
movieClip_array[6] = btn_step6_mc;
movieClip_array[7] = btn_step7_mc;
movieClip_array[8] = btn_step8_mc;
movieClip_array[9] = btn_step9_mc;
movieClip_array[10] = btn_step10_mc;
movieClip_array[11] = stage1_mc;
movieClip_array[12] = stage2_mc;
movieClip_array[13] = stage3_mc;
for(x=0;x<=(movieClip_array.length-1);x++){
currentButton = movieClip_array[x];
currentButton.onRollOver = function() {
currentButton._alpha = 80;
trace(currentButton);
}
}
Ultimately, I would like the onRelease function load the movieClip_array[x] into a movieClip on the main timeline.
Do I have the right thinking or am I way off?
Matt :confused:
Here's what I have so far... Any help would be greatly appreciated.
// Create movieClip ARRAY
movieClip_array = new Array ();
movieClip_array[0] = btn_step0_mc;
movieClip_array[1] = btn_step1_mc;
movieClip_array[2] = btn_step2_mc;
movieClip_array[3] = btn_step3_mc;
movieClip_array[4] = btn_step4_mc;
movieClip_array[5] = btn_step5_mc;
movieClip_array[6] = btn_step6_mc;
movieClip_array[7] = btn_step7_mc;
movieClip_array[8] = btn_step8_mc;
movieClip_array[9] = btn_step9_mc;
movieClip_array[10] = btn_step10_mc;
movieClip_array[11] = stage1_mc;
movieClip_array[12] = stage2_mc;
movieClip_array[13] = stage3_mc;
for(x=0;x<=(movieClip_array.length-1);x++){
currentButton = movieClip_array[x];
currentButton.onRollOver = function() {
currentButton._alpha = 80;
trace(currentButton);
}
}
Ultimately, I would like the onRelease function load the movieClip_array[x] into a movieClip on the main timeline.
Do I have the right thinking or am I way off?
Matt :confused: