home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / dtunnel.swf / scripts / DefineSprite_14_explosion / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  2.3 KB  |  77 lines

  1. i = 30;
  2. while(i > 0)
  3. {
  4.    wone = random(2);
  5.    rotation = random(361);
  6.    size = random(50) + 70;
  7.    if(wone == 0)
  8.    {
  9.       attachMovie("smallpar","smallpar" + _root.depth,_root.depth);
  10.       _root.explosion["smallpar" + _root.depth]._x = _root.explosion["smallpar" + _root.depth]._y = 0;
  11.       _root.explosion["smallpar" + _root.depth]._rotation = rotation;
  12.       _root.explosion["smallpar" + _root.depth]._xscale = _root.explosion["smallpar" + _root.depth]._yscale = size;
  13.       if(_root.depth < 1000)
  14.       {
  15.          _root.depth = _root.depth + 1;
  16.       }
  17.       else
  18.       {
  19.          _root.depth = 5;
  20.       }
  21.    }
  22.    else
  23.    {
  24.       attachMovie("bigpar","bigpar" + _root.depth,_root.depth);
  25.       _root.explosion["bigpar" + _root.depth]._x = _root.explosion["bigpar" + _root.depth]._y = 0;
  26.       _root.explosion["bigpar" + _root.depth]._rotation = rotation;
  27.       _root.explosion["bigpar" + _root.depth]._xscale = _root.explosion["bigpar" + _root.depth]._yscale = size;
  28.       if(_root.depth < 1000)
  29.       {
  30.          _root.depth = _root.depth + 1;
  31.       }
  32.       else
  33.       {
  34.          _root.depth = 5;
  35.       }
  36.    }
  37.    i--;
  38. }
  39. i = 5;
  40. while(i > 0)
  41. {
  42.    wone = random(2);
  43.    rotation = random(60) - 30;
  44.    size = random(50) + 70;
  45.    if(wone == 0)
  46.    {
  47.       attachMovie("smallpar","smallpar" + _root.depth,_root.depth);
  48.       _root.explosion["smallpar" + _root.depth]._x = _root.explosion["smallpar" + _root.depth]._y = 0;
  49.       _root.explosion["smallpar" + _root.depth]._rotation = rotation;
  50.       _root.explosion["smallpar" + _root.depth]._xscale = _root.explosion["smallpar" + _root.depth]._yscale = size;
  51.       if(_root.depth < 1000)
  52.       {
  53.          _root.depth = _root.depth + 1;
  54.       }
  55.       else
  56.       {
  57.          _root.depth = 5;
  58.       }
  59.    }
  60.    else
  61.    {
  62.       attachMovie("bigpar","bigpar" + _root.depth,_root.depth);
  63.       _root.explosion["bigpar" + _root.depth]._x = _root.explosion["bigpar" + _root.depth]._y = 0;
  64.       _root.explosion["bigpar" + _root.depth]._rotation = rotation;
  65.       _root.explosion["bigpar" + _root.depth]._xscale = _root.explosion["bigpar" + _root.depth]._yscale = size;
  66.       if(_root.depth < 1000)
  67.       {
  68.          _root.depth = _root.depth + 1;
  69.       }
  70.       else
  71.       {
  72.          _root.depth = 5;
  73.       }
  74.    }
  75.    i--;
  76. }
  77.