     drawDashLine(target:Graphics, fromX:Number, fromY:Number,
                  toX:Number, toY:Number, dashIntervals:Array):void
     {
-        var dx:Number;
-        var dy:Number;
-        var ux:Number;
-        var uy:Number;
-        var cx:Number;
-        var cy:Number;
-        var lineDistance:Number;
+        var deltaX:Number, deltaY:Number,
+            unitX:Number, unitY:Number,
+            currentX:Number, currentY:Number,
+            lineDistance:Number;
+
         var sumDistance:Number = 0;
-        var dash:int = 0;
+
+        var dashIndex:int = 0;
 
         if (!dashIntervals || dashIntervals.length < 2)
         {

    drawCross(target:Graphics, centreX:Number, centreY:Number,
              halfWidth:Number, halfHeight:Number = Number.NaN):void
    {
        if (isNaN(halfHeight)) halfHeight = halfWidth;

        target.moveTo(centreX - halfWidth, centreY - halfHeight);
        target.lineTo(centreX + halfWidth, centreY + halfHeight);

              headHalfWidthFactor:Number = Number.NaN,
              closeHead:Boolean = false):void
    {
        var deltaX:Number, deltaY:Number, headDeltaX:Number,
            headDeltaY:Number, headCenterX:Number, headCenterY:Number;

        if (isNaN(headHalfWidthFactor))
        {
            headHalfWidthFactor = headLengthFactor * 0.5;
        }

        target.moveTo(fromX, fromY);
        target.lineTo(toX, toY);

        deltaX = toX - fromX;
        deltaY = toY - fromY;

        headCenterX = fromX + (1 - headLengthFactor) * deltaX;
        headCenterY = fromY + (1 - headLengthFactor) * deltaY;

        headDeltaX = -deltaY * headHalfWidthFactor;
        headDeltaY = deltaX * headHalfWidthFactor;

        target.moveTo(headCenterX + headDeltaX, headCenterY + headDeltaY);
        target.lineTo(toX, toY);
        target.lineTo(headCenterX - headDeltaX, headCenterY - headDeltaY);

        if (closeHead)
        {
            target.lineTo(headCenterX + headDeltaX, headCenterY + headDeltaY);
        }
    }
}
