title: Firing a shot from a character in the direction of mouse click
body: <p>So first off i'd like to state that i am not very good at AS3, i'm completely self taught so i am sure that there are many things i've done badly, inefficiently or plain wrong and i'm happy for any comments on these if there is things i can improve.</p>
  
  <p>So i'm trying to add the functionality for a player to be able to click on a part of my game and a"hook" will fire from the character in the direction of the mouse click for a certain length. the end of this will then be collision detection between that hook and a platform. </p>
  
  <p>however the problem i'm having is i have no idea how to run the code which will locate the angle which the hook needs to be fired in, i understand this is a certain amount of maths and any help which can be given would be helpful ( even if you can't fix the problem for me)</p>
  
  <p>So far i have been able to locate the x and y positions of both my hero and the position on the mouse click this code is shown below:</p>
  
  <pre><code> public function Hookshot (event:MouseEvent):void {
  
      PlatformInstance[i] =new Platform();
          var _point:Point = localToGlobal (new Point(mouseX,mouseY));
           var heroX:int = Smallclock_hero.x;
           var heroY:int = Smallclock_hero.y;
           trace (heroX)
          trace (heroY)
           trace(_point.x)
          trace(_point.y)
      }
  </code></pre>
  
  <p>I'm not sure there is any other relevant code as of yet as i haven't been able to wrap my head around how to do this kind of maths.</p>
  
  <p>if there is any additional code you need or any questions you have please ask away and thanks in advance! </p>