home *** CD-ROM | disk | FTP | other *** search
- _root.enemymove2 = function()
- {
- var ec = _root.enemyarray.length - 1;
- while(ec >= 0)
- {
- if(_root.enemyarray[ec].enemytypevar == "boss1")
- {
- if(_root.enemyarray[ec]._x == _root.enemyarray[ec].destx and _root.enemyarray[ec]._y == _root.enemyarray[ec].desty)
- {
- _root.boss1arrive = true;
- }
- if(_root.boss1arrive == true)
- {
- _root.enemyarray[ec].destx = random(300) + 300;
- _root.enemyarray[ec].desty = random(300) + 100;
- _root.boss1arrive = false;
- }
- if(Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > _root.boss1speed)
- {
- if(_root.enemyarray[ec]._x < _root.enemyarray[ec].destx)
- {
- _root.enemyarray[ec]._x += _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._x -= _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
- }
- if(Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > _root.boss1speed)
- {
- if(_root.enemyarray[ec]._y < _root.enemyarray[ec].desty)
- {
- _root.enemyarray[ec]._y += _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._y -= _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "boss2")
- {
- if(_root.enemyarray[ec]._x < 700)
- {
- _root.bossready = true;
- }
- if(_root.enemyarray[ec]._x == _root.enemyarray[ec].destx and _root.enemyarray[ec]._y == _root.enemyarray[ec].desty)
- {
- _root.boss2arrive = true;
- }
- if(_root.boss2arrive == true)
- {
- _root.enemyarray[ec].destx = random(300) + 300;
- _root.enemyarray[ec].desty = random(300) + 100;
- _root.boss2arrive = false;
- }
- if(Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > 0.6 * _root.boss1speed)
- {
- if(_root.enemyarray[ec]._x < _root.enemyarray[ec].destx)
- {
- _root.enemyarray[ec]._x += 0.6 * _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._x -= 0.6 * _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
- }
- if(Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > 0.6 * _root.boss1speed)
- {
- if(_root.enemyarray[ec]._y < _root.enemyarray[ec].desty)
- {
- _root.enemyarray[ec]._y += 0.6 * _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._y -= 0.6 * _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "boss3head")
- {
- _root.enemyarray[ec].diffx = int(_root.boss3x - _root.enemyarray[ec]._x);
- _root.enemyarray[ec].diffy = int(_root.boss3y - _root.enemyarray[ec]._y);
- if(_root.enemyarray[ec].diffx > 0 && _root.enemyarray[ec].diffy > 0)
- {
- _root.enemyarray[ec].quad = Number(4);
- }
- if(_root.enemyarray[ec].diffx < 0 && _root.enemyarray[ec].diffy > 0)
- {
- _root.enemyarray[ec].quad = Number(1);
- }
- if(_root.enemyarray[ec].diffx < 0 && _root.enemyarray[ec].diffy < 0)
- {
- _root.enemyarray[ec].quad = Number(2);
- }
- if(_root.enemyarray[ec].diffx > 0 && _root.enemyarray[ec].diffy < 0)
- {
- _root.enemyarray[ec].quad = Number(3);
- }
- _root.enemyarray[ec].abs_x = Math.abs(_root.enemyarray[ec].diffx);
- _root.enemyarray[ec].abs_y = Math.abs(_root.enemyarray[ec].diffy);
- _root.enemyarray[ec].tg = _root.enemyarray[ec].abs_y / _root.enemyarray[ec].abs_x;
- _root.enemyarray[ec].maths = Math.atan(_root.enemyarray[ec].tg) * Number(180) / 3.141592653589793;
- _root.enemyarray[ec].distance = Math.sqrt(_root.enemyarray[ec]._x - _root.boss3x ^ 2 + (_root.enemyarray[ec]._y - _root.boss3y) ^ 2);
- if(_root.enemyarray[ec].quad == 1)
- {
- _root.enemyarray[ec].angle = Number(180) - Number(_root.enemyarray[ec].maths);
- }
- if(_root.enemyarray[ec].quad == 2)
- {
- _root.enemyarray[ec].angle = Number(180) + Number(_root.enemyarray[ec].maths);
- }
- if(_root.enemyarray[ec].quad == 3)
- {
- _root.enemyarray[ec].angle = Number(360) - Number(_root.enemyarray[ec].maths);
- }
- if(_root.enemyarray[ec].quad == 4)
- {
- _root.enemyarray[ec].angle = Number(_root.enemyarray[ec].maths);
- }
- if(_root.enemyarray[ec].angle <= 180)
- {
- if(_root.enemyarray[ec]._rotation + 180 >= _root.enemyarray[ec].angle)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay;
- }
- else if(_root.enemyarray[ec].angle >= _root.enemyarray[ec]._rotation)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay;
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.boss3turndelay;
- }
- }
- else if(_root.enemyarray[ec].angle > 180)
- {
- if(_root.enemyarray[ec].angle - 180 < _root.enemyarray[ec]._rotation)
- {
- if(_root.enemyarray[ec]._rotation < _root.enemyarray[ec].angle)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.boss3turndelay;
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.boss3turndelay;
- }
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (360 - (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation)) / _root.boss3turndelay;
- }
- }
- _root.enemyarray[ec].xmove = _root.boss3s * Math.cos(0.017453292519943295 * _root.enemyarray[ec]._rotation);
- _root.enemyarray[ec].ymove = _root.boss3s * Math.sin(0.017453292519943295 * _root.enemyarray[ec]._rotation);
- _root.enemyarray[ec]._x += _root.enemyarray[ec].xmove;
- _root.enemyarray[ec]._y += _root.enemyarray[ec].ymove;
- if(_root.enemyarray[ec].distance < 5)
- {
- if(_root.difficulty == "easy")
- {
- if(_root.boss3counter < _root.boss3xarray.length - 1)
- {
- _root.boss3counter = _root.boss3counter + 1;
- }
- else
- {
- _root.boss3counter = 0;
- }
- _root.boss3x = _root.boss3xarray[_root.boss3counter];
- _root.boss3y = _root.boss3yarray[_root.boss3counter];
- _root.boss3s = _root.boss3sarray[_root.boss3counter];
- _root.boss3turndelay = _root.boss3turndelayarray[_root.boss3counter];
- }
- else if(_root.difficulty == "expert")
- {
- _root.boss3x = random(699) + 1;
- _root.boss3y = random(499) + 1;
- _root.boss3s = random(11) + 5;
- _root.boss3turndelay = random(7) + 4;
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "boss3body" or _root.enemyarray[ec].enemytypevar == "boss3tail")
- {
- _root.enemyarray[ec].offx = _root.enemyarray[ec - 1].enemytype.attachpoint._x * Math.cos(_root.enemyarray[ec - 1]._rotation * 3.141592653589793 / 180);
- _root.enemyarray[ec].offy = _root.enemyarray[ec - 1].enemytype.attachpoint._x * Math.sin((- _root.enemyarray[ec - 1]._rotation) * 3.141592653589793 / 180);
- _root.enemyarray[ec]._x = _root.enemyarray[ec - 1]._x + _root.enemyarray[ec - 1].enemytype._x + _root.enemyarray[ec].offx;
- _root.enemyarray[ec]._y = _root.enemyarray[ec - 1]._y + _root.enemyarray[ec - 1].enemytype._y - _root.enemyarray[ec].offy;
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec - 1]._rotation - _root.enemyarray[ec]._rotation) / 7;
- }
- else if(_root.enemyarray[ec].enemytypevar == "fboss")
- {
- if(_root.fbossrest == false)
- {
- if(_root.enemyarray[ec]._x == _root.enemyarray[ec].destx and _root.enemyarray[ec]._y == _root.enemyarray[ec].desty)
- {
- _root.fbossarrive = true;
- }
- if(_root.fbossarrive == true)
- {
- _root.enemyarray[ec].destx = random(300) + 300;
- _root.enemyarray[ec].desty = random(300) + 100;
- _root.fbossarrive = false;
- }
- if(Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > 0.6 * _root.boss1speed)
- {
- if(_root.enemyarray[ec]._x < _root.enemyarray[ec].destx)
- {
- _root.enemyarray[ec]._x += 0.6 * _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._x -= 0.6 * _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
- }
- if(Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > 0.6 * _root.boss1speed)
- {
- if(_root.enemyarray[ec]._y < _root.enemyarray[ec].desty)
- {
- _root.enemyarray[ec]._y += 0.6 * _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._y -= 0.6 * _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
- }
- _root.fbossrestcounter = _root.fbossrestcounter + 1;
- if(_root.fbossrestcounter == _root.fbossresttime)
- {
- _root.fbossrestcounter = 0;
- _root.fbossticker = 0;
- _root.e1w1pos = _root.e2w1pos = _root.e3w1pos = _root.e4w1pos = _root.e4w2pos = _root.e5w1pos = _root.e6w1pos = _root.e7w1pos = 0;
- if(_root.enemyarray[ec].health > 450 * _root.health)
- {
- _root.fbosswave = 1;
- }
- else if(_root.enemyarray[ec].health > 350 * _root.health)
- {
- _root.fbosswave = 2;
- _root.assignx = 800;
- _root.assigny = random(300) + 100;
- _root.healthpowerupfunction();
- }
- else if(_root.enemyarray[ec].health > 0)
- {
- _root.fbosswave = 3;
- }
- _root.changeframes = true;
- _root.assignx = 900;
- _root.assigny = 250;
- _root.minihealthpowerupfunction();
- _root.fbossrest = true;
- }
- }
- else
- {
- if(_root.enemyarray[ec]._x < 1500)
- {
- _root.enemyarray[ec]._x += 0.6 * _root.boss1speed;
- }
- if(_root.changeframes == true)
- {
- if(_root.enemyarray[ec]._x > 750 + _root.enemyarray[ec]._width)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("blank");
- _root.changeframes = false;
- }
- }
- _root.fbossrestcounter = _root.fbossrestcounter + 1;
- if(_root.fbossrestcounter == 500)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("fboss");
- _root.fbossrest = false;
- _root.fbossresttime = 625;
- _root.changeframes = true;
- _root.fbossrestcounter = 0;
- _root.fbossarrive = true;
- _root.fbosswave = 0;
- }
- }
- _root.fbossnumber = ec;
- }
- else if(_root.enemyarray[ec].enemytypevar == "launcher1")
- {
- _root.enemyarray[ec]._x = _root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x + _root.enemyarray[_root.fbossnumber].enemytype.missile._x;
- _root.enemyarray[ec]._y = _root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y + _root.enemyarray[_root.fbossnumber].enemytype.missile._y;
- if(_root.changeframes == true)
- {
- if(_root.fbossrest == true)
- {
- if(_root.enemyarray[ec]._x > 700 + _root.enemyarray[ec]._width)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("blank");
- }
- }
- else
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("launcher");
- if(ec == 1)
- {
- _root.changeframes = false;
- }
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "launcher2")
- {
- _root.enemyarray[ec]._x = _root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x + _root.enemyarray[_root.fbossnumber].enemytype.missile2._x;
- _root.enemyarray[ec]._y = _root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y + _root.enemyarray[_root.fbossnumber].enemytype.missile2._y;
- if(_root.changeframes == true)
- {
- if(_root.fbossrest == true)
- {
- if(_root.enemyarray[ec]._x > 700 + _root.enemyarray[ec]._width)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("blank");
- }
- }
- else
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("launcher");
- if(ec == 1)
- {
- _root.changeframes = false;
- }
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "launcher3")
- {
- _root.enemyarray[ec]._x = _root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x + _root.enemyarray[_root.fbossnumber].enemytype.missile3._x;
- _root.enemyarray[ec]._y = _root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y + _root.enemyarray[_root.fbossnumber].enemytype.missile3._y;
- if(_root.changeframes == true)
- {
- if(_root.fbossrest == true)
- {
- if(_root.enemyarray[ec]._x > 700 + _root.enemyarray[ec]._width)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("blank");
- }
- }
- else
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("launcher");
- if(ec == 1)
- {
- _root.changeframes = false;
- }
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "launcher4")
- {
- _root.enemyarray[ec]._x = _root.enemyarray[_root.fbossnumber]._x + _root.enemyarray[_root.fbossnumber].enemytype._x + _root.enemyarray[_root.fbossnumber].enemytype.missile4._x;
- _root.enemyarray[ec]._y = _root.enemyarray[_root.fbossnumber]._y + _root.enemyarray[_root.fbossnumber].enemytype._y + _root.enemyarray[_root.fbossnumber].enemytype.missile4._y;
- if(_root.changeframes == true)
- {
- if(_root.fbossrest == true)
- {
- if(_root.enemyarray[ec]._x > 700 + _root.enemyarray[ec]._width)
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("blank");
- }
- }
- else
- {
- _root.enemyarray[ec].enemytype.gotoAndStop("launcher");
- if(ec == 1)
- {
- _root.changeframes = false;
- }
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "rocket")
- {
- if(_root.enemyarray[ec]._x > 730 or _root.enemyarray[ec]._x < -30)
- {
- _root.enemyarray[ec].removeMovieClip();
- _root.enemyarray.splice(ec,1);
- }
- if(_root.enemyarray[ec].deploy == true)
- {
- _root.enemyarray[ec]._rotation = _root.enemyarray[ec].angle * 180 / 3.141592653589793;
- _root.enemyarray[ec]._x += _root.enemyarray[ec].speedx * Math.cos(_root.enemyarray[ec].angle);
- _root.enemyarray[ec]._y += _root.enemyarray[ec].speedy * Math.sin(_root.enemyarray[ec].angle);
- _root.enemyarray[ec].deploytimer = _root.enemyarray[ec].deploytimer + 1;
- if(_root.enemyarray[ec].deploytimer == 15)
- {
- _root.enemyarray[ec].deploy = false;
- }
- }
- else if(_root.enemyarray[ec].deploy == false)
- {
- _root.enemyarray[ec].diffx = int(_root.ship._x + _root.ship.shipmc._x - _root.enemyarray[ec]._x);
- _root.enemyarray[ec].diffy = int(_root.ship._y + _root.ship.shipmc._y - _root.enemyarray[ec]._y);
- if(_root.enemyarray[ec].diffx > 0 && _root.enemyarray[ec].diffy > 0)
- {
- _root.enemyarray[ec].quad = Number(4);
- }
- if(_root.enemyarray[ec].diffx < 0 && _root.enemyarray[ec].diffy > 0)
- {
- _root.enemyarray[ec].quad = Number(1);
- }
- if(_root.enemyarray[ec].diffx < 0 && _root.enemyarray[ec].diffy < 0)
- {
- _root.enemyarray[ec].quad = Number(2);
- }
- if(_root.enemyarray[ec].diffx > 0 && _root.enemyarray[ec].diffy < 0)
- {
- _root.enemyarray[ec].quad = Number(3);
- }
- _root.enemyarray[ec].abs_x = Math.abs(_root.enemyarray[ec].diffx);
- _root.enemyarray[ec].abs_y = Math.abs(_root.enemyarray[ec].diffy);
- _root.enemyarray[ec].tg = _root.enemyarray[ec].abs_y / _root.enemyarray[ec].abs_x;
- _root.enemyarray[ec].maths = Math.atan(_root.enemyarray[ec].tg) * Number(180) / 3.141592653589793;
- _root.enemyarray[ec].distance = Math.sqrt(_root.enemyarray[ec]._x - (_root.ship._x + _root.ship.shipmc._x) ^ 2 + (_root.enemyarray[ec]._y - (_root.ship._y + _root.ship.shipmc._y)) ^ 2);
- if(_root.enemyarray[ec].quad == 1)
- {
- _root.enemyarray[ec].angle = Number(180) - Number(_root.enemyarray[ec].maths);
- }
- else if(_root.enemyarray[ec].quad == 2)
- {
- _root.enemyarray[ec].angle = Number(180) + Number(_root.enemyarray[ec].maths);
- }
- else if(_root.enemyarray[ec].quad == 3)
- {
- _root.enemyarray[ec].angle = Number(360) - Number(_root.enemyarray[ec].maths);
- }
- else if(_root.enemyarray[ec].quad == 4)
- {
- _root.enemyarray[ec].angle = Number(_root.enemyarray[ec].maths);
- }
- _root.enemyarray[ec].xmove = _root.enemyarray[ec].speedx * Math.cos(0.017453292519943295 * _root.enemyarray[ec].angle);
- _root.enemyarray[ec].ymove = _root.enemyarray[ec].speedy * Math.sin(0.017453292519943295 * _root.enemyarray[ec].angle);
- if(_root.enemyarray[ec].angle <= 180)
- {
- if(_root.enemyarray[ec]._rotation + 180 >= _root.enemyarray[ec].angle)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay;
- }
- else if(_root.enemyarray[ec].angle >= _root.enemyarray[ec]._rotation)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay;
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.enemyarray[ec].megahomingturndelay;
- }
- }
- else if(_root.enemyarray[ec].angle > 180)
- {
- if(_root.enemyarray[ec].angle - 180 < _root.enemyarray[ec]._rotation)
- {
- if(_root.enemyarray[ec]._rotation < _root.enemyarray[ec].angle)
- {
- _root.enemyarray[ec]._rotation += (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation) / _root.enemyarray[ec].megahomingturndelay;
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (_root.enemyarray[ec]._rotation - _root.enemyarray[ec].angle) / _root.enemyarray[ec].megahomingturndelay;
- }
- }
- else
- {
- _root.enemyarray[ec]._rotation -= (360 - (_root.enemyarray[ec].angle - _root.enemyarray[ec]._rotation)) / _root.enemyarray[ec].megahomingturndelay;
- }
- }
- _root.enemyarray[ec]._x += _root.enemyarray[ec].xmove;
- _root.enemyarray[ec]._y += _root.enemyarray[ec].ymove;
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy1")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed;
- _root.enemyarray[ec]._y += (_root.ship._y - (_root.enemyarray[ec]._y - _root.enemyarray[ec].enemytype._height)) / 25;
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy2")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed * 0.6666666666666666;
- if(_root.enemyarray[ec].e2arrive != false)
- {
- _root.enemyarray[ec].nextpos = 500 - _root.enemyarray[ec]._y;
- _root.enemyarray[ec].e2arrive = false;
- }
- else
- {
- _root.enemyarray[ec]._y += (_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y) / Math.abs(_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y) * (_root.enemy1speed / 2);
- if(Math.abs(_root.enemyarray[ec].nextpos - _root.enemyarray[ec]._y) < 5)
- {
- _root.enemyarray[ec].e2arrive = true;
- }
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy3")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed * 0.4;
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy4")
- {
- _root.enemyarray[ec]._y += (_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) / 10;
- _root.enemyarray[ec]._x -= _root.enemy1speed / 2;
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy4wave2")
- {
- if(_root.enemyarray[ec]._x == _root.enemyarray[ec].destx and _root.enemyarray[ec]._y == _root.enemyarray[ec].desty)
- {
- _root.enemyarray[ec].e4arrive = true;
- }
- if(_root.enemyarray[ec].e4arrive == true)
- {
- _root.enemyarray[ec].destx = random(300) + 300;
- _root.enemyarray[ec].desty = random(300) + 100;
- _root.enemyarray[ec].e4arrive = false;
- }
- if(Math.abs(_root.enemyarray[ec].destx - _root.enemyarray[ec]._x) > _root.boss1speed)
- {
- if(_root.enemyarray[ec]._x < _root.enemyarray[ec].destx)
- {
- _root.enemyarray[ec]._x += _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._x -= _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._x = _root.enemyarray[ec].destx;
- }
- if(Math.abs(_root.enemyarray[ec].desty - _root.enemyarray[ec]._y) > _root.boss1speed)
- {
- if(_root.enemyarray[ec]._y < _root.enemyarray[ec].desty)
- {
- _root.enemyarray[ec]._y += _root.boss1speed;
- }
- else
- {
- _root.enemyarray[ec]._y -= _root.boss1speed;
- }
- }
- else
- {
- _root.enemyarray[ec]._y = _root.enemyarray[ec].desty;
- }
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy5")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed / 4;
- _root.enemyarray[ec].enemytype._rotation += 8;
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy6")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed / 3;
- }
- else if(_root.enemyarray[ec].enemytypevar == "enemy7")
- {
- _root.enemyarray[ec]._x -= _root.enemy1speed / 3.5;
- }
- ec--;
- }
- };
-