I am working on a page where three differnt buttons effect one movie clips properties, the one movie clip will go to its rollover state when any of the buttons are on rollover, hmm, that sounds about right]
i have assigned functions within a loop and the rollovers, rollouts and instance in the loop have been defined for all but the movieClips dont go to the right place…
the code i have used is this…
for (var i:Number = 1; i < 4; i++) {
// attaching ALL rollovers to effect the interactive button
this["invis"+i+"_btn"].onRollOver = this["chart"+i+"_btn"].onRollOver = this["inter"+i+"_mc"].onRollOver = function() {
buttonName = this._name;
buttonNumber = Number(buttonName.substr(5, 1));
trace ("rollover");
trace (buttonNumber);
this["inter"+buttonNumber+"_mc"].gotoAndStop("on");
}
this["invis"+i+"_btn"].onRollOut = this["chart"+i+"_btn"].onRollOut = this["inter"+i+"_mc"].onRollOut = function() {
trace ("rollout");
buttonName = this._name;
buttonNumber = Number(buttonName.substr(5, 1));
this["inter"+buttonNumber+"_mc"].gotoAndStop("normal");
}
}
as i have said…all the traces show up correct but not the gotoAndStop on the movieClip (inter+i+mc)'s
any ideas??