1 Attachment(s)
Strange sprite behavior with loop
I've got a movieclip ("boxes_mc") with 2 frames. Each frame has the 3 same movieclip instances (3 different boxes, "box1_mc","box2_mc","box3_mc"), just in different positions.
On the main stage are 2 buttons that switch the frame of the clip...works great...until...
I put a for loop on the main stage to make the box clips alpha go to 30 when you rollover and back to 100 when you rollout...
The buttons still work fine UNTIL you rollover a clip...then, the boxes don't display in the position they should be in, they display in the position they were in on frame 1...
Here's the code:
Code:
for(i=1;i<=3;i++){
boxOver=boxes_mc["box"+i+"_mc"];
boxOver.onRollOver=function(){
this._alpha=30;
}
boxOver.onRollOut=function(){
this._alpha=100;
}
}
btn1_mc.onPress=function(){
this._parent.boxes_mc.gotoAndStop(1);
}
btn2_mc.onPress=function(){
this._parent.boxes_mc.gotoAndStop(2);
}
stop();
and I attached the fla...
Thanks!!!