soar


          private function soar(evt:Event):void {
                  x += vector.x;
                  y += vector.y;
                  var shapeBounds:Rectangle = getBounds(parent);
                  if (shapeBounds.left < bounds.left) {
                          vector.x = Math.abs(vector.x);
                  }else if (shapeBounds.right > bounds.right) {
                          vector.x = -Math.abs(vector.x);
                  }
                  if (shapeBounds.top < bounds.top) {
                          vector.y = Math.abs(vector.y);
                  }else if (shapeBounds.bottom > bounds.bottom) {
                          vector.y = -Math.abs(vector.y);
                  }
                  vector.x *= friction;
                  vector.y *= friction;
          }
  }