1
imcotton 2012-07-03 11:15:46 +08:00 1
var list:Array = [btn1, btn2];
for each (var i:IEventDispatcher in list) i.addEventListener(MouseEvent.CLICK, onClick); function onClick (event:MouseEvent):void { var index:int = list.indexOf(event.target); if (index == -1) return; gotoAndPlay(index + 1); } |