home *** CD-ROM | disk | FTP | other *** search
- function InitGhost(TheGhost)
- {
- TheGhost._x = random(450);
- TheGhost._y = -20;
- TheGhost.Delay = random(100);
- TheGhost.Fall = false;
- TheGhost.N = random(4) + 1;
- switch(TheGhost.N)
- {
- case 1:
- TheGhost.R = 100;
- TheGhost.G = 0;
- TheGhost.B = 0;
- break;
- case 2:
- TheGhost.R = 120;
- TheGhost.G = 90;
- TheGhost.B = 95;
- break;
- case 3:
- TheGhost.R = 0;
- TheGhost.G = 100;
- TheGhost.B = 100;
- break;
- case 4:
- TheGhost.R = 120;
- TheGhost.G = 90;
- TheGhost.B = 0;
- }
- TheGhost._visible = true;
- TheGhost.BCol = new Color(TheGhost.Body);
- TheGhost.BCol.setTransform({ra:TheGhost.R,rb:0,ga:TheGhost.G,gb:0,ba:TheGhost.B,bb:0,aa:100,ab:0});
- TheGhost.Num.gotoAndStop(TheGhost.N);
- TheGhost.gotoAndStop(1);
- TheGhost.Speed = 2 + Math.random() * 2;
- }
- TotalGhosts = 20;
- cg = 1;
- while(cg <= TotalGhosts)
- {
- duplicateMovieClip("GhostSample","g" + cg,16384 + this.getNextHighestDepth());
- InitGhost(this["g" + cg]);
- cg++;
- }
- GhostSample._visible = false;
-