home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / bug.swf / scripts / DefineSprite_832 / frame_3 / DoAction.as
Encoding:
Text File  |  2007-03-28  |  2.2 KB  |  91 lines

  1. bug.cables = [];
  2. i = 0;
  3. while(i < 4)
  4. {
  5.    m = "c" + i;
  6.    bug.cables[i] = new Object();
  7.    bug.cables[i].pos = new Array();
  8.    bug.cables[i].scale = this[m].scale;
  9.    bug.cables[i].rotation = this[m].rotation;
  10.    bug.cables[i].label = this[m].label;
  11.    f = 0;
  12.    while(f < this[m]._totalFrames)
  13.    {
  14.       this[m].gotoAndStop(f + 1);
  15.       b = this[m].getBounds(this);
  16.       bug.cables[i].pos[f] = new Object();
  17.       bug.cables[i].pos[f].x = b.xMin + (b.xMax - b.Xmin) / 2;
  18.       bug.cables[i].pos[f].y = b.yMin + (b.yMax - b.ymin) / 2;
  19.       f++;
  20.    }
  21.    this[m].removeMovieClip();
  22.    i++;
  23. }
  24. i = 0;
  25. while(i < 16)
  26. {
  27.    m = "bird" + i;
  28.    attachMovie("bird",m,i + 17);
  29.    this[m]._x = -100;
  30.    this[m]._y = -100;
  31.    this[m].gotoAndStop(1);
  32.    this[m]._visible = false;
  33.    i++;
  34. }
  35. crow = [];
  36. i = 0;
  37. while(i < 7)
  38. {
  39.    m = "p" + i;
  40.    b = "b" + i;
  41.    crow[i] = new Object();
  42.    crow[i].u = new Array();
  43.    crow[i].pos = new Array();
  44.    crow[i].back = new Array();
  45.    crow[i].r = 0;
  46.    crow[i].strikeFrom = this[m].strikeFrom;
  47.    crow[i].strikeTo = this[m].strikeTo;
  48.    crow[i].pathLow = this[m].pathLow;
  49.    crow[i].birdLow = this[m].birdLow;
  50.    crow[i].scale = this[m].scale;
  51.    f = 0;
  52.    while(f < this[m]._totalFrames)
  53.    {
  54.       this[m].gotoAndStop(f + 1);
  55.       crow[i].pos[f] = new Object();
  56.       if(this[m]._width == 0)
  57.       {
  58.          crow[i].pos[f].x = crow[i].pos[f].y = crow[i].pos[f].c = 0;
  59.       }
  60.       else
  61.       {
  62.          b = this[m].getBounds(this);
  63.          crow[i].pos[f].x = b.xMin;
  64.          crow[i].pos[f].y = b.yMin + (b.yMax - b.ymin) / 2;
  65.          crow[i].pos[f].c = (b.xMax - b.xmin) / 3;
  66.       }
  67.       f++;
  68.    }
  69.    f = 0;
  70.    while(f < this[b]._totalFrames)
  71.    {
  72.       this[b].gotoAndStop(f + 1);
  73.       crow[i].back[f] = new Object();
  74.       if(this[b]._width == 0)
  75.       {
  76.          crow[i].back[f].x = crow[i].back[f].y = crow[i].back[f].c = 0;
  77.       }
  78.       else
  79.       {
  80.          b = this[b].getBounds(this);
  81.          crow[i].back[f].x = b.xMin;
  82.          crow[i].back[f].y = b.yMin + (b.yMax - b.ymin) / 2;
  83.          crow[i].back[f].c = (b.xMax - b.xmin) / 3;
  84.       }
  85.       f++;
  86.    }
  87.    this[b].removeMovieClip();
  88.    this[m].removeMovieClip();
  89.    i++;
  90. }
  91.