home *** CD-ROM | disk | FTP | other *** search
- createEmptyMovieClip("left",_root.depth);
- with(left)
- {
- beginFill(_root.mycolor,100);
- moveTo(0,0);
- lineStyle(3,_root.mycolor,100);
- nextx = _root.nextx;
- nexty = 0;
- lineTo(nextx,nexty);
- _root.coordinates.push(nextx);
- _root.coordinates.push(nexty);
- i = 25;
- while(i > 0)
- {
- addx = random(Math.round(_root.jaggyness / 2)) + _root.jaggyness / 2;
- if(nextx <= addx + 10)
- {
- nextx += addx;
- }
- else if(nextx + addx > _root.stagewidth - _root.tunnelwidth - 10)
- {
- nextx -= addx;
- trace("minus");
- }
- else
- {
- aors = random(2);
- if(aors == 0)
- {
- nextx += addx;
- }
- else
- {
- nextx -= addx;
- }
- }
- nexty -= _root.addy;
- lineTo(nextx,nexty);
- _root.coordinates.push(nextx);
- _root.coordinates.push(nexty);
- i--;
- }
- _root.nextx = nextx;
- lineTo(0,nexty);
- LineTo(0,0);
- endFill();
- }
- if(_root.depth < 1000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 5;
- }
- createEmptyMovieClip("right",_root.depth);
- with(right)
- {
- beginFill(_root.mycolor,100);
- moveTo(_root.stagewidth,0);
- lineStyle(3,_root.mycolor,100);
- i = _root.coordinates.length / 2;
- while(i > 0)
- {
- lineTo(_root.coordinates[0] + _root.tunnelwidth,_root.coordinates[1]);
- rlasty = _root.coordinates[1];
- _root.coordinates.splice(0,2);
- i--;
- }
- lineTo(_root.stagewidth,rlasty);
- lineTo(_root.stagewidth,0);
- endFill();
- }
- if(_root.depth < 1000)
- {
- _root.depth = _root.depth + 1;
- }
- else
- {
- _root.depth = 5;
- }
-