How to stop character walking from when road scrolling reach the edge of screen?

hi
here i have a zipped fla file where i have problem with the character still wallking when road scrolling reach the end of the screen.
how would i stop that?

heres script:

//road scrolling
road.onEnterFrame = function() {
    if (_xmouse>600 || _xmouse<200) {
        midpoint = 400;
        right = this._x+this._width;
        if (_root._xmouse<midpoint) {
            if (this._x<0) {
                this._x = this._x+((midpoint-_root._xmouse)/50);
            }
        } else {
            if (this._x+this._width>800) {
                this._x = this._x-((_root._xmouse-midpoint)/50);
            }
        }
    }
};
//4 different mascot movieclips and all invisible to begin with except one 
mascot.mascotfl._visible = 0;
mascot.mascotfr._visible = 1;
mascot.mascotwl._visible = 0;
mascot.mascotwr._visible = 0;
//mascot movieclips in/visible depending on _xmouse
mascot.onEnterFrame = function() {
    if ((_xmouse<400) && (_xmouse>200)) {
        mascot.mascotfl._visible = 1;
        mascot.mascotfr._visible = 0;
        mascot.mascotwl._visible = 0;
        mascot.mascotwr._visible = 0;
    }
    if (_xmouse<200) {
        mascot.mascotfl._visible = 0;
        mascot.mascotfr._visible = 0;
        mascot.mascotwl._visible = 1;
        mascot.mascotwr._visible = 0;
    }
    if ((_xmouse>400) && (_xmouse<600)) {
        mascot.mascotfl._visible = 0;
        mascot.mascotfr._visible = 1;
        mascot.mascotwl._visible = 0;
        mascot.mascotwr._visible = 0;
    }
    if (_xmouse>600) {
        mascot.mascotfl._visible = 0;
        mascot.mascotfr._visible = 0;
        mascot.mascotwl._visible = 0;
        mascot.mascotwr._visible = 1;
    }
};

thanks