Problem transfering code from flash 6 to 8

Have been having a lot of problem transfering this script to flash8. Need some help…

code:

dep = 1;
long = 5;
rough = 1;
curb = 10;
maxangle=60;
maxsize = 4;
y_start = Stage.height+50;
clip_arr = new Array ();
dep = 0;
count =0;
ang = 0;
size = 0;
maxlength = 0;
x = 0;
y = 0;
next_x = 0;
next_y = 0;
mc = 0;

function growroot (x,y,ang,size,maxlength) {
if (size==maxsize) x=random(Stage.width/2);

var mc = _root.createEmptyMovieClip(""+dep,dep++);
clip_arr.push(mc);
mc.lineStyle(size,0x000000,10);
mc.moveTo(x,y);
mc.old_x = x;
mc.old_y = y;
mc.onEnterFrame=function(){
    if (this.count++ < maxlength){
        var next_x = this.old_x + long*Math.cos(ang*Math.PI/180) + rough*(Math.random()-.5);
        var next_y = this.old_y + long*Math.sin(ang*Math.PI/180) + rough*(Math.random()-.5);
        this.lineTo(next_x,next_y);
        if (curb) ang += random(2*curb) - curb + 1/2;
        this.clip._x = this.old_x = next_x;
        this.clip._y = this.old_y = next_y;
        if (Math.random() > .97 && size)
            growroot(next_x,next_y,ang+random(maxangle)-maxangle/2,size-1,maxlength/2+random(maxlength/3));
    }
    else {
        delete this.onEnterFrame;
        growheart (this.old_x, this.old_y, size*2+4);
    }
}

}

growroot(null,y_start,-90,maxsize,120);
myInterval = setInterval(growroot,20000,null,y_start,-90,maxsize,120);