var aPhotos:Array = new Array(mPhoto0,mPhoto1,mPhoto2);
var aThumbs:Array = new Array(mThumb0,mThumb1,mThumb2);
function thumbClick(evt:Event):void {
trace(evt.target.name);
clearPhotos();
var count:Number = aThumbs.length;
var index:Index:
for(var i:Number = 0;i
index = i;
}
}
aPhotos[index].visible = true;
}
function clearPhotos():Void{
mPhoto0.visible = false;
mPhoto1.visible = false;
mPhoto2.visible = false;
}
for (var i:Number = 0;i
aThumbs[i].addEventListener(MouseEvent.ROLL_OUT, btnOut);
aThumbs[i].addEventListener(MouseEvent.CLICK, thumbClick);
aThumbs[i].mouseChildren = false;
}
No comments:
Post a Comment