var score:int = 0; //讓字彈移動並漸漸縮小 function bulletMove(event:Event): void { if (event.target.scaleX > 0.3) { //一次縮小10% event.target.scaleX = event.target.scaleX - 0.1; event.target.scaleY = event.target.scaleY - 0.1; } else { event.target.parent.removeChild(event.target); event.target.removeEventListener(Event.ENTER_FRAME, bulletMove); // 檢查泡泡 var deadBubble:Object=shotCheck(event.target as MovieClip); if (deadBubble != null) { deadBubble.removeEventListener(Event.ENTER_FRAME, onFramePlaying); bubbleArea.removeChild(deadBubble as MovieClip); score = score + 3; score_txt.text = score.toString(); } } }