title: AS3 - How to drag an object in a line that is not vertical or horizontal
body: <p>I would like to drag an object in one line.
  I already know how to do this in a horizontal or vertical line</p>
  
  <p>Here's how I do this</p>
  
  <pre><code>private var handle:Sprite;
  
  private function init():void
  {
      handle = new Sprite();
      handle.mouseChildren = false;
      handle.buttonMode = true;
      handle.graphics.beginFill(0xFF0000);
      handle.graphics.drawCircle(0, 0, 5);
  
      handle.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
      handle.addEventListener(MouseEvent.MOUSE_UP, stopMove); 
  }
  
  private function startMove(evt:MouseEvent):void
  {               
  
      var bounds:Rectangle = new Rectangle(0, 0, 100, 1);
      handle.startDrag(false, bounds);
  
  }
  
  private function stopMove(evt:MouseEvent):void
  {
      handle.stopDrag();
  }
  </code></pre>
  
  <p>But I want do drag my object in a line that isn't horizontal or vertical. 
  For example, I would like to drag the object from the top left corner to the bottom right corner, in one straight line.</p>
  
  <p>I tried to rotate the bounds rectangle, but it seems that you can not rotate a Rectangle.</p>
  
  <p>How do I drag an object in a non-vertical (or non-horizontal) line?</p>
  
  <p>Thank you very much!</p>
  
  <p>Vincent</p>