home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / bossbash.swf / scripts / DefineSprite_559 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-09-28  |  988 b   |  33 lines

  1. stop();
  2. this.onEnterFrame = function()
  3. {
  4.    v = 0;
  5.    while(v < this._parent._parent.vegarray.length)
  6.    {
  7.       var veb = this._parent._parent.vegarray[v];
  8.       var veg = eval("this._parent._parent.bubs." + veb);
  9.       if(this.wartmouth.hitTest(veg))
  10.       {
  11.          veg.removeMovieClip();
  12.          this._parent._parent.vegarray = new Array();
  13.          this.playhit = true;
  14.          this._parent._parent.hitcount += 1;
  15.          this._parent._parent.hurt.start();
  16.          this.gotoAndStop("hit");
  17.          trace(this._parent._parent.hitcount);
  18.          delete this.onEnterFrame;
  19.       }
  20.       v++;
  21.    }
  22.    if(this.wartmouth.hitTest(this._parent._parent.bubs.as))
  23.    {
  24.       this._parent._parent.hurt.start();
  25.       this._parent._parent.hitcount = 6;
  26.       this._parent._parent.bubs.as.removeMovieClip();
  27.       this._parent._parent.vegarray = new Array();
  28.       this.playhit = true;
  29.       this.gotoAndStop("hit");
  30.       delete this.onEnterFrame;
  31.    }
  32. };
  33.