home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / dragonforce.swf / scripts / frame_2 / DoAction_6.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  19.0 KB  |  495 lines

  1. _root.bulletarray = new Array();
  2. _root.red1 = function()
  3. {
  4.    _root.interval = 5;
  5.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  6.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  7.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  8.    _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
  9.    _root["bullet" + _root.depth].yvalue = 0;
  10.    _root["bullet" + _root.depth].shottype = "red1";
  11.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  12.    if(_root.depth < 100000)
  13.    {
  14.       _root.depth = _root.depth + 1;
  15.    }
  16.    else
  17.    {
  18.       _root.depth = 100;
  19.    }
  20. };
  21. _root.red2 = function()
  22. {
  23.    _root.interval = 5;
  24.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  25.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  26.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  27.    _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
  28.    _root["bullet" + _root.depth].yvalue = 0;
  29.    _root["bullet" + _root.depth].gotoAndStop("red2");
  30.    _root["bullet" + _root.depth].shottype = "red2";
  31.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  32.    if(_root.depth < 100000)
  33.    {
  34.       _root.depth = _root.depth + 1;
  35.    }
  36.    else
  37.    {
  38.       _root.depth = 100;
  39.    }
  40. };
  41. _root.red3 = function()
  42. {
  43.    _root.interval = 5;
  44.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  45.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  46.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  47.    _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
  48.    _root["bullet" + _root.depth].yvalue = 0;
  49.    _root["bullet" + _root.depth].gotoAndStop("red3");
  50.    _root["bullet" + _root.depth].shottype = "red3";
  51.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  52.    if(_root.depth < 100000)
  53.    {
  54.       _root.depth = _root.depth + 1;
  55.    }
  56.    else
  57.    {
  58.       _root.depth = 100;
  59.    }
  60. };
  61. _root.red4 = function()
  62. {
  63.    _root.interval = 6;
  64.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  65.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  66.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  67.    _root["bullet" + _root.depth].xvalue = _root.x20;
  68.    _root["bullet" + _root.depth].yvalue = _root.y20;
  69.    _root["bullet" + _root.depth]._rotation = 20;
  70.    _root["bullet" + _root.depth].gotoAndStop("red2");
  71.    _root["bullet" + _root.depth].shottype = "red4";
  72.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  73.    if(_root.depth < 100000)
  74.    {
  75.       _root.depth = _root.depth + 1;
  76.    }
  77.    else
  78.    {
  79.       _root.depth = 100;
  80.    }
  81.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  82.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  83.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  84.    _root["bullet" + _root.depth].xvalue = _root.bulletspeed;
  85.    _root["bullet" + _root.depth].yvalue = 0;
  86.    _root["bullet" + _root.depth].gotoAndStop("red2");
  87.    _root["bullet" + _root.depth].shottype = "red4";
  88.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  89.    if(_root.depth < 100000)
  90.    {
  91.       _root.depth = _root.depth + 1;
  92.    }
  93.    else
  94.    {
  95.       _root.depth = 100;
  96.    }
  97.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  98.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.gun._x;
  99.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.gun._y;
  100.    _root["bullet" + _root.depth].xvalue = _root.x20;
  101.    _root["bullet" + _root.depth].yvalue = - _root.y20;
  102.    _root["bullet" + _root.depth]._rotation = -20;
  103.    _root["bullet" + _root.depth].gotoAndStop("red2");
  104.    _root["bullet" + _root.depth].shottype = "red4";
  105.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  106.    if(_root.depth < 100000)
  107.    {
  108.       _root.depth = _root.depth + 1;
  109.    }
  110.    else
  111.    {
  112.       _root.depth = 100;
  113.    }
  114. };
  115. _root.sred = function()
  116. {
  117.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  118.    _root["bullet" + _root.depth]._x = _root.sredx;
  119.    _root["bullet" + _root.depth]._y = _root.sredy;
  120.    _root["bullet" + _root.depth].destx = 100;
  121.    _root["bullet" + _root.depth].desty = 100;
  122.    _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
  123.    _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
  124.    _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
  125.    _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
  126.    _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
  127.    _root["bullet" + _root.depth].gotoAndStop("bomb");
  128.    _root["bullet" + _root.depth].shottype = "sred";
  129.    _root["bullet" + _root.depth].exploding = false;
  130.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  131.    if(_root.depth < 100000)
  132.    {
  133.       _root.depth = _root.depth + 1;
  134.    }
  135.    else
  136.    {
  137.       _root.depth = 100;
  138.    }
  139.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  140.    _root["bullet" + _root.depth]._x = _root.sredx;
  141.    _root["bullet" + _root.depth]._y = _root.sredy;
  142.    _root["bullet" + _root.depth].destx = 600;
  143.    _root["bullet" + _root.depth].desty = 100;
  144.    _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
  145.    _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
  146.    _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
  147.    _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
  148.    _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
  149.    _root["bullet" + _root.depth].gotoAndStop("bomb");
  150.    _root["bullet" + _root.depth].shottype = "sred";
  151.    _root["bullet" + _root.depth].exploding = false;
  152.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  153.    if(_root.depth < 100000)
  154.    {
  155.       _root.depth = _root.depth + 1;
  156.    }
  157.    else
  158.    {
  159.       _root.depth = 100;
  160.    }
  161.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  162.    _root["bullet" + _root.depth]._x = _root.sredx;
  163.    _root["bullet" + _root.depth]._y = _root.sredy;
  164.    _root["bullet" + _root.depth].destx = 100;
  165.    _root["bullet" + _root.depth].desty = 400;
  166.    _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
  167.    _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
  168.    _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
  169.    _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
  170.    _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
  171.    _root["bullet" + _root.depth].gotoAndStop("bomb");
  172.    _root["bullet" + _root.depth].shottype = "sred";
  173.    _root["bullet" + _root.depth].exploding = false;
  174.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  175.    if(_root.depth < 100000)
  176.    {
  177.       _root.depth = _root.depth + 1;
  178.    }
  179.    else
  180.    {
  181.       _root.depth = 100;
  182.    }
  183.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  184.    _root["bullet" + _root.depth]._x = _root.sredx;
  185.    _root["bullet" + _root.depth]._y = _root.sredy;
  186.    _root["bullet" + _root.depth].destx = 600;
  187.    _root["bullet" + _root.depth].desty = 400;
  188.    _root["bullet" + _root.depth].diffx = _root["bullet" + _root.depth]._x - _root["bullet" + _root.depth].destx;
  189.    _root["bullet" + _root.depth].diffy = _root["bullet" + _root.depth]._y - _root["bullet" + _root.depth].desty;
  190.    _root["bullet" + _root.depth].angle = Math.atan2(_root["bullet" + _root.depth].diffy,_root["bullet" + _root.depth].diffx);
  191.    _root["bullet" + _root.depth].xvalue = -15 * Math.cos(_root["bullet" + _root.depth].angle);
  192.    _root["bullet" + _root.depth].yvalue = -15 * Math.sin(_root["bullet" + _root.depth].angle);
  193.    _root["bullet" + _root.depth].gotoAndStop("bomb");
  194.    _root["bullet" + _root.depth].shottype = "sred";
  195.    _root["bullet" + _root.depth].exploding = false;
  196.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  197.    if(_root.depth < 100000)
  198.    {
  199.       _root.depth = _root.depth + 1;
  200.    }
  201.    else
  202.    {
  203.       _root.depth = 100;
  204.    }
  205. };
  206. _root.blue1 = function()
  207. {
  208.    _root.interval = 10;
  209.    _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
  210.    _root["bullet" + _root.bluedepth]._x = _root.ship._x;
  211.    _root["bullet" + _root.bluedepth]._y = _root.ship._y;
  212.    _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
  213.    _root["bullet" + _root.bluedepth].yvalue = 0;
  214.    _root["bullet" + _root.bluedepth].gotoAndStop("blue1");
  215.    _root["bullet" + _root.bluedepth].shottype = "blue1";
  216.    _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
  217.    _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
  218.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
  219.    if(_root.bluedepth < 100040)
  220.    {
  221.       _root.bluedepth = _root.bluedepth + 1;
  222.    }
  223.    else
  224.    {
  225.       _root.bluedepth = 100010;
  226.    }
  227.    _root.blueready = false;
  228.    _root["bullet" + _root.bluedepth].explodedelay = 0;
  229. };
  230. _root.blue2 = function()
  231. {
  232.    _root.interval = 11;
  233.    _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
  234.    _root["bullet" + _root.bluedepth]._x = _root.ship._x;
  235.    _root["bullet" + _root.bluedepth]._y = _root.ship._y;
  236.    _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
  237.    _root["bullet" + _root.bluedepth].yvalue = 0;
  238.    _root["bullet" + _root.bluedepth].gotoAndStop("blue2");
  239.    _root["bullet" + _root.bluedepth].shottype = "blue2";
  240.    _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
  241.    _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
  242.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
  243.    if(_root.bluedepth < 100040)
  244.    {
  245.       _root.bluedepth = _root.bluedepth + 1;
  246.    }
  247.    else
  248.    {
  249.       _root.bluedepth = 100010;
  250.    }
  251.    _root["bullet" + _root.bluedepth].explodedelay = 0;
  252. };
  253. _root.blue3 = function()
  254. {
  255.    _root.interval = 11;
  256.    _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
  257.    _root["bullet" + _root.bluedepth]._x = _root.ship._x;
  258.    _root["bullet" + _root.bluedepth]._y = _root.ship._y;
  259.    _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
  260.    _root["bullet" + _root.bluedepth].yvalue = 0;
  261.    _root["bullet" + _root.bluedepth].gotoAndStop("blue3");
  262.    _root["bullet" + _root.bluedepth].shottype = "blue3";
  263.    _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
  264.    _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
  265.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
  266.    if(_root.bluedepth < 100040)
  267.    {
  268.       _root.bluedepth = _root.bluedepth + 1;
  269.    }
  270.    else
  271.    {
  272.       _root.bluedepth = 100010;
  273.    }
  274.    _root["bullet" + _root.bluedepth].explodedelay = 0;
  275. };
  276. _root.blue4 = function()
  277. {
  278.    _root.interval = 12;
  279.    _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
  280.    _root["bullet" + _root.bluedepth]._x = _root.ship._x;
  281.    _root["bullet" + _root.bluedepth]._y = _root.ship._y;
  282.    _root["bullet" + _root.bluedepth].xvalue = _root.bulletspeed;
  283.    _root["bullet" + _root.bluedepth].yvalue = 0;
  284.    _root["bullet" + _root.bluedepth].gotoAndStop("blue4");
  285.    _root["bullet" + _root.bluedepth].shottype = "blue4";
  286.    _root["bullet" + _root.bluedepth].randomframe = random(5) + 1;
  287.    _root["bullet" + _root.bluedepth].blue.gotoAndPlay(randomframe);
  288.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
  289.    if(_root.bluedepth < 100040)
  290.    {
  291.       _root.bluedepth = _root.bluedepth + 1;
  292.    }
  293.    else
  294.    {
  295.       _root.bluedepth = 100010;
  296.    }
  297.    _root["bullet" + _root.bluedepth].explodedelay = 0;
  298. };
  299. _root.sblue = function()
  300. {
  301.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  302.    _root["bullet" + _root.depth]._x = _root.sbluex;
  303.    _root["bullet" + _root.depth]._y = _root.sbluey;
  304.    _root["bullet" + _root.depth].xvalue = _root.powerupspeed;
  305.    _root["bullet" + _root.depth].yvalue = 0;
  306.    _root["bullet" + _root.depth].gotoAndStop("sblue");
  307.    _root["bullet" + _root.depth].shottype = "sblue";
  308.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  309.    if(_root.depth < 100000)
  310.    {
  311.       _root.depth = _root.depth + 1;
  312.    }
  313.    else
  314.    {
  315.       _root.depth = 100;
  316.    }
  317. };
  318. _root.green1 = function()
  319. {
  320.    _root.interval = 6;
  321.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  322.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
  323.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
  324.    _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
  325.    _root["bullet" + _root.depth].yvalue = 0;
  326.    _root["bullet" + _root.depth].gotoAndStop("green1");
  327.    _root["bullet" + _root.depth].shottype = "green1";
  328.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  329.    if(_root.depth < 100000)
  330.    {
  331.       _root.depth = _root.depth + 1;
  332.    }
  333.    else
  334.    {
  335.       _root.depth = 100;
  336.    }
  337. };
  338. _root.green2 = function()
  339. {
  340.    _root.interval = 5;
  341.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  342.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
  343.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
  344.    _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
  345.    _root["bullet" + _root.depth].yvalue = 0;
  346.    _root["bullet" + _root.depth].gotoAndStop("green2");
  347.    _root["bullet" + _root.depth].shottype = "green2";
  348.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  349.    if(_root.depth < 100000)
  350.    {
  351.       _root.depth = _root.depth + 1;
  352.    }
  353.    else
  354.    {
  355.       _root.depth = 100;
  356.    }
  357. };
  358. _root.green3 = function()
  359. {
  360.    _root.interval = 5;
  361.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  362.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
  363.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
  364.    _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
  365.    _root["bullet" + _root.depth].yvalue = 0;
  366.    _root["bullet" + _root.depth].gotoAndStop("green3");
  367.    _root["bullet" + _root.depth].shottype = "green3";
  368.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  369.    if(_root.depth < 100000)
  370.    {
  371.       _root.depth = _root.depth + 1;
  372.    }
  373.    else
  374.    {
  375.       _root.depth = 100;
  376.    }
  377. };
  378. _root.green4 = function()
  379. {
  380.    _root.interval = 4;
  381.    _root.shot.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  382.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.green._x;
  383.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.green._y;
  384.    _root["bullet" + _root.depth].xvalue = 5 + _root.bulletspeed;
  385.    _root["bullet" + _root.depth].yvalue = 0;
  386.    _root["bullet" + _root.depth].gotoAndStop("green4");
  387.    _root["bullet" + _root.depth].shottype = "green4";
  388.    _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.depth];
  389.    if(_root.depth < 100000)
  390.    {
  391.       _root.depth = _root.depth + 1;
  392.    }
  393.    else
  394.    {
  395.       _root.depth = 100;
  396.    }
  397. };
  398. _root.firelaser = function()
  399. {
  400.    if(_root.status.mask.laser._xscale == 100)
  401.    {
  402.       _root.lasersound.start(0,0);
  403.       _root.shot.duplicateMovieClip("bullet" + _root.bluedepth,_root.bluedepth);
  404.       _root["bullet" + _root.bluedepth].gotoAndStop("laser");
  405.       _root["bullet" + _root.bluedepth]._x = _root.ship._x + _root.ship.laser._x;
  406.       _root["bullet" + _root.bluedepth]._y = _root.ship._y + _root.ship.laser._y;
  407.       _root.bulletarray[_root.bulletarray.length] = _root["bullet" + _root.bluedepth];
  408.       _root["bullet" + _root.bluedepth].xvalue = 40;
  409.       _root["bullet" + _root.bluedepth].yvalue = 0;
  410.       _root.status.mask.laser._xscale = 0;
  411.       _root["bullet" + _root.bluedepth].shottype = "laser";
  412.       if(_root.bluedepth < 100040)
  413.       {
  414.          _root.bluedepth = _root.bluedepth + 1;
  415.       }
  416.       else
  417.       {
  418.          _root.bluedepth = 100010;
  419.       }
  420.    }
  421. };
  422. _root.firehmfunction = function()
  423. {
  424.    _root.megahoming.duplicateMovieClip("bullet" + _root.depth,_root.depth);
  425.    _root["bullet" + _root.depth]._x = _root.ship._x + _root.ship.missile._x;
  426.    _root["bullet" + _root.depth]._y = _root.ship._y + _root.ship.missile._y;
  427.    if(_root.enemyarray.length >= 1)
  428.    {
  429.       _root["bullet" + _root.depth].enemynumber = Number(_root.targetenemy);
  430.       _root["bullet" + _root.depth].targetname = _root.enemyarray[_root.targetenemy]._name;
  431.       _root["bullet" + _root.depth].targetname._visible = true;
  432.    }
  433.    else
  434.    {
  435.       _root["bullet" + _root.depth].targetname._visible = false;
  436.    }
  437.    _root["bullet" + _root.depth].megahomingacceleratex = 2;
  438.    _root["bullet" + _root.depth].megahomingacceleratey = 2;
  439.    _root["bullet" + _root.depth].megahomingturndelay = 3;
  440.    _root["bullet" + _root.depth].deploy = true;
  441.    _root["bullet" + _root.depth].deployrate = 5;
  442.    _root["bullet" + _root.depth].speedx = 0;
  443.    _root["bullet" + _root.depth].speedy = 0;
  444.    _root["bullet" + _root.depth].shottype = "homingmissile";
  445.    _root.bulletarray.push(_root["bullet" + _root.depth]);
  446.    if(_root.depth < 100000)
  447.    {
  448.       _root.depth = _root.depth + 1;
  449.    }
  450.    else
  451.    {
  452.       _root.depth = 100;
  453.    }
  454. };
  455. _root.firebomb = function()
  456. {
  457.    if(_root.numberofbombs >= 0)
  458.    {
  459.       if(_root.bombfire == true)
  460.       {
  461.          if(_root.bombsound == false)
  462.          {
  463.             _root.bombexplodesound.start(0,0);
  464.             _root.bombsound = true;
  465.          }
  466.          _root.bomb1.bomb.gotoAndStop(2);
  467.          _root.bombexplode = true;
  468.       }
  469.       if(_root.numberofbombs > 0)
  470.       {
  471.          if(_root.bombfire == false)
  472.          {
  473.             _root.shot.duplicateMovieClip("bomb1",_root.bluedepth);
  474.             _root.bomb1.gotoAndStop("bomb");
  475.             _root.bomb1._x = _root.ship._x + _root.ship.bomb._x;
  476.             _root.bomb1._y = _root.ship._y + _root.ship.bomb._y;
  477.             _root.bomb1.xvalue = 20;
  478.             _root.bomb1.shottype = "bomb";
  479.             _root.bombfire = true;
  480.             _root.numberofbombs--;
  481.             _root.status.bomb.gotoAndStop(_root.numberofbombs + 1);
  482.             _root.bulletarray[_root.bulletarray.length] = _root.bomb1;
  483.             if(_root.bluedepth < 100040)
  484.             {
  485.                _root.bluedepth = _root.bluedepth + 1;
  486.             }
  487.             else
  488.             {
  489.                _root.bluedepth = 100010;
  490.             }
  491.          }
  492.       }
  493.    }
  494. };
  495.