title: AS3 Touch Event to make Object/Character move upwards, having difficulty with code
body: <p>I'm building my first game application for Android on Flash CS6 Actionscript 3.0. 
  What I'm trying to achieve is either:</p>
  
  <p>Touch and hold press (character moves upward) Release finger (character falls towards the ground)</p>
  
  <p>OR:</p>
  
  <p>Tap (character moves up a few pixels) and Release (character falls down a few pixels).</p>
  
  <p>I've looked all over the place and I've managed to put this together: </p>
  
  <pre><code>elephantp.addEventListener(TouchEvent.TOUCH, isPressed);
  
  private function isPressed(event:TouchEvent):void
  {
      var touch:touch = event.getTouch(elephantp);
  
      if(touch.phase == TouchPhase.BEGAN)
      {
          trace("pressed just now");
  
          elephantp.y += 5;
          addEventListener(Event.ENTER_FRAME, onButtonHold);
      }
  
      if(touch.phase == TouchPhase.ENDED)
      {
          trace("release");
  
          elephantp.y -= 5;
          removeEventListener(Event.ENTER_FRAME, onButtonHold);
      }
  }
  </code></pre>
  
  <p>//OR</p>
  
  <pre><code>private function onButtonHold(e:Event):void
  {
      trace("doing stuff while button pressed!");
  }
  
  
   Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  
   elephantp.addEventListener(TouchEvent.TOUCH_TAP, fl_TapHandler);
  
   function fl_TapHandler(event:TouchEvent):void
      {
  
          elephantp.y += 5;
  
      }
  </code></pre>