3 Replies Latest reply: Jun 9, 2010 11:49 AM by Petro O. Bochan RSS

    counter

    Fumph Community Member

      I have a movieclip and when you click on it I want to add 1 to my counter. Here's my code:

      counter.text = "0" enemy1.addEventListener(MouseEvent.MOUSE_DOWN, resizeWindow); function resizeWindow(e:MouseEvent):void{ enemy1.x = 800 counter.text += 1 }

      counter is my text box. When enemy1 is clicked on counter.text shows "01" instead of "1" which I want to happen.