home *** CD-ROM | disk | FTP | other *** search
- _X = _X + (speed * direct + _root.movevar);
- myx = _X;
- myy = _Y;
- myw = _width * 0.5;
- myh = _height * 0.5;
- if(_root.restart eq "true")
- {
- gotoAndStop("off");
- play();
- }
- if(targon eq "false")
- {
- if(myx > -1 * myw and myx < _root.stageW + myw)
- {
- listnum = _root.enlist.length;
- _root.enlist[_root.enlist.length] = _name;
- this._visible = 1;
- targon = "true";
- }
- }
- else
- {
- this;
- if(hitTest(_root.chopper))
- {
- _root.chopper.hits -= 5;
- _root.chopper.chopper.field.gotoAndPlay(2);
- if(myx > _root.playerX)
- {
- _root.chopper.xmove = -20;
- _X = _X + 10;
- }
- else
- {
- _root.chopper.xmove = 20;
- _X = _X - 10;
- }
- if(myy > _root.playerY)
- {
- _root.chopper.ymove = -20;
- _Y = _Y + 10;
- }
- else
- {
- _root.chopper.ymove = 20;
- _Y = _Y - 10;
- }
- hits -= 5;
- power.gotoAndPlay(2);
- }
- if(myx < myw * -1 or myx > _root.stageW + myw)
- {
- _root.enlist.splice(listnum,1);
- e = listnum;
- e;
- while(e < _root.enlist.length)
- {
- eval("_root." add _root.enlist[e]).listnum -= 1;
- e++;
- }
- this._visible = 0;
- targon = "false";
- }
- }
- if(bombing eq "false")
- {
- b += 1;
- if(b > _root.entarglist.length - 1)
- {
- b = 0;
- }
- targ = _root.entarglist[b][0];
- bombH = _root.entarglist[b][1];
- if(myx < eval("_root." add targ)._x + 100 and myx > eval("_root." add targ)._x - 450)
- {
- bombing = "true";
- bombcnt = 0;
- bombvar = (bombH - _Y) * 0.1;
- orgbombvar = bombvar;
- }
- }
- else
- {
- bombcnt += 1;
- trace("BombCount= " + bombcnt);
- if(bombcnt < 15)
- {
- _Y = _Y + 0.5;
- bombvar *= 0.5;
- }
- else if(bombcnt == 15)
- {
- duplicateMovieClip(_root.bomb,"bomb" add mynum,16384 + (mynum + 100));
- eval("_root.bomb" add mynum)._xscale *= direct;
- eval("_root.bomb" add mynum)._x = myx;
- eval("_root.bomb" add mynum)._y = myy;
- eval("_root.bomb" add mynum).speed = speed;
- eval("_root.bomb" add mynum).direct = direct;
- eval("_root.bomb" add mynum).titan = "false";
- eval("_root.bomb" add mynum).targ = targ.substring(0,4);
- eval("_root.bomb" add mynum).gotoAndPlay(3);
- bombvar = orgbombvar;
- }
- else if(bombcnt > 30)
- {
- _Y = _Y - 0.5;
- bombvar *= 0.5;
- }
- }
- if(hits < 0)
- {
- _root.bombertocnt += 1;
- gotoAndStop("explode");
- play();
- }
- else
- {
- gotoAndPlay(_currentframe - 1);
- }
-