Tracing a persons movement

This is an experimental script that allows you, the user, to draw a line, then the script will trace the line. It takes in all your coordinates of your mouse movements in two arrays, mX and mY. When the script replays your line it simply replots another line using the coordinates stored in the arrays.

// Variables and what-not that needs to be set
_root.createEmptyMovieClip("line", 1);
_root.createEmptyMovieClip("pcLine", 2);

pcLine.lineStyle(2, 0xCE9DCE, 100);
line.lineStyle(2, 0x000000, 100);

var mX:Array = new Array();
var mY:Array = new Array();

var i:Number = 0;

var traced:Boolean = false; // for debugging purposes
var completed:Boolean = false;

///////////////////////////////

_root.onEnterFrame = function() {
    _root.onMouseDown = function() {
        if (!completed) {
            line.moveTo(_xmouse, _ymouse);
            line.lineStyle(2, 0x000000, 100);
            _root.onMouseMove = function() {
                mY* = _ymouse;
                mX* = _xmouse;
                i++;
                line.lineTo(_xmouse, _ymouse);
                updateAfterEvent();
            };
        }
    };
    if (completed) {
        showTrace.onRelease = function() {
            if (!traced) {
                trace("_x = "+mX+"
");
                trace("_y = "+mY+"
");
                trace("length = "+mY.length+"
");
                traced = true;
            }
            pcLine.moveTo(mX[0], mY[0]);
            for (k=0; k<mY.length; k++) {
                pcLine.lineTo(mX[k], mY[k]);
            }
        };
    }
};
_root.onMouseUp = function() {
    this.onMouseMove = null;
    completed = true;
};

Source is here and live demo is [url=“http://cannedlaughter.net/traceMe.swf”]here.

A Problematic Problem:
It’s too fast, you can’t see the line being replotted so it just looks like the line is changing colours.