var myMenuArray = [watchesBtn, strapsBtn, sunwearBtn, handbagsBtn];
for each (var btn in myMenuArray) {
btn.addEventListener(MouseEvent.CLICK, onBtnClick);
btn.addEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
}
function onBtnClick (event:MouseEvent):void {
//gotoAndStop(event.target.index);
trace("watches");
}
function onBtnOver (event:MouseEvent):void {
myMenuArray[event.index].gotoAndStop(2);
}
I’m obviously a super n00b, because This second function keeps returning an error, and I’ve tried almost every different variation I can think of. All I want it to do is go to the second frame of the movie clip that is scrolled over. Help, please?