home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / dragonforce.swf / scripts / DefineSprite_169 / frame_10 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1.5 KB  |  24 lines

  1. _root.enemybullet.duplicateMovieClip("enemybullet" + _root.depth,_root.depth);
  2. _root["enemybullet" + _root.depth].offx = _parent.gun._x * Math.cos(_parent._parent._rotation * 3.141592653589793 / 180);
  3. _root["enemybullet" + _root.depth].offy = _parent.gun._x * Math.sin((- _parent._parent._rotation) * 3.141592653589793 / 180);
  4. _root["enemybullet" + _root.depth]._x = _parent._parent._x + _parent._x + _root["enemybullet" + _root.depth].offx;
  5. _root["enemybullet" + _root.depth]._y = _parent._parent._y + _parent._y - _root["enemybullet" + _root.depth].offy;
  6. _root["enemybullet" + _root.depth].gotoAndStop("boss3");
  7. _root["enemybullet" + _root.depth].shottype = "enemy";
  8. _root["enemybullet" + _root.depth].enemyshottype = "boss3";
  9. _root["enemybullet" + _root.depth].diffx = _root["enemybullet" + _root.depth]._x - (_root.ship._x + _root.ship.shipmc._x);
  10. _root["enemybullet" + _root.depth].diffy = _root["enemybullet" + _root.depth]._y - (_root.ship._y + _root.ship.shipmc._y);
  11. _root["enemybullet" + _root.depth].angle = Math.atan2(_root["enemybullet" + _root.depth].diffy,_root["enemybullet" + _root.depth].diffx);
  12. _root["enemybullet" + _root.depth].xvalue = -8 * Math.cos(_root["enemybullet" + _root.depth].angle);
  13. _root["enemybullet" + _root.depth].yvalue = -8 * Math.sin(_root["enemybullet" + _root.depth].angle);
  14. _root.bulletarray[_root.bulletarray.length] = _root["enemybullet" + _root.depth];
  15. _root["enemybullet" + _root.depth].follow = 0;
  16. if(_root.depth < 10000)
  17. {
  18.    _root.depth = _root.depth + 1;
  19. }
  20. else
  21. {
  22.    _root.depth = 33;
  23. }
  24.