// 新增numArray陣列,用來記錄拉霸開獎數字 var numArray:Array=new Array(); numArray[0]=1; numArray[1]=2; numArray[2]=3; //按下開始按鈕,執行自訂函數slot_start start_btn.addEventListener(MouseEvent.CLICK,slot_start); function slot_start(me:MouseEvent) { barPic1_mc.play(); //拉霸圖案1播放 barPic2_mc.play(); //拉霸圖案2播放 barPic3_mc.play(); //拉霸圖案3播放 winning_mc.gotoAndStop(1); //中獎動畫停在影格1 stop_btn.enabled = true; //停止按鈕可以動作 }