title: Trying to make my player shoot by touching any part of the screen
body: <p>I am trying to make my player shoot by touching the screen, I already done that, the only problem is that it just shoots if I touch the player, but what I want is to be able to shoot by touching any part of the screen, any suggestions? I would appreciate it.</p>
  
  <pre><code>import flash.display.MovieClip;
  import flash.events.AccelerometerEvent;
  import flash.sensors.Accelerometer;
  import flash.events.Event;
  import flash.ui.Multitouch;
  import flash.ui.MultitouchInputMode;
  import flash.events.TouchEvent;
  import flash.system.TouchscreenType;
  
  public class spaceShooter extends MovieClip {
  
      public var mcPlayer:MovieClip;
      private var theAcc:Accelerometer = new Accelerometer();
      private var aMissileArray:Array;
  
  
      public function spaceShooter() {
          // constructor code
  
          ///////////////////////////
          ///////Missile Array///////
          ///////////////////////////
          aMissileArray = new Array();
  
  
          //////////////////////////////////////////////////
          //////////////Touch-Tap Missile///////////////////
          //////////////////////////////////////////////////
          addEventListener(TouchEvent.TOUCH_TAP, onTouch);
  
  
          //////////////////////////////////////////////////
          //////////Player Movement Accelerometer///////////
          //////////////////////////////////////////////////
          stage.addEventListener(Event.ENTER_FRAME, gameLoop)
  
          theAcc.addEventListener(AccelerometerEvent.UPDATE, onAcc);
  
          function onAcc(e:AccelerometerEvent):void{
          mcPlayer.x -= (e.accelerationX * 65);
          }
  
          /////////////////////////////////////////////////
          ////////////Fire Missile onTouch/////////////////
          ////////////////////////////////////////////////
          Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  
          function onTouch(event:TouchEvent):void
          {
              ////////////////
              //fire missile//
              ////////////////
              fireMissile();
          }
  
          function fireMissile():void
          {
              //////////////////////
              //create new missile//
              //////////////////////
              var newMissile:mcMissile = new mcMissile();
              ///////////////////////////////////
              //add missile object to the stage//
              ///////////////////////////////////
              stage.addChild(newMissile);
              ////////////////////////////////////////////////
              //position our missile object on top of player//
              ////////////////////////////////////////////////
              newMissile.x = mcPlayer.x;
              newMissile.y = mcPlayer.y;
              /////////////////////////////
              //add our new missile array//
              /////////////////////////////
              aMissileArray.push(newMissile);
              trace(aMissileArray.length);
          }
  
      }
  
      private function gameLoop(e:Event):void{
          clampPlayerToStage();
      }
          /////////////////////////////////////////////
          //If our player is to the Left of The Stage//
          /////////////////////////////////////////////
      private function clampPlayerToStage():void{
          if(mcPlayer.x &lt; mcPlayer.width/2)
          {
              mcPlayer.x = mcPlayer.width/2;
          }
  
  
          //////////////////////////////////////////////
          //If our Player is to the Right of the Stage//
          //////////////////////////////////////////////
          if(mcPlayer.x &gt; stage.stageWidth - (mcPlayer.width/2))
          {
              mcPlayer.x = stage.stageWidth - (mcPlayer.width/2);
          }
      }
  }
  </code></pre>