# Problem transfering code from flash 6 to 8

**URL:** <https://forum.kirupa.com/t/problem-transfering-code-from-flash-6-to-8/236846>\
**Category:** flash\
**Created:** [August 24, 2007, 5:11am UTC](https://forum.kirupa.com/t/problem-transfering-code-from-flash-6-to-8/236846 "2007-08-24T05:11:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![futil](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@futil](https://forum.kirupa.com/u/futil)\
**Post date:** [August 24, 2007, 5:11am UTC](https://forum.kirupa.com/t/problem-transfering-code-from-flash-6-to-8/236846/1 "2007-08-24T05:11:01Z")

</div>

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++ &lt; 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() &gt; .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);
