home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / bossbash.swf / scripts / DefineSprite_342_bomtoons_bubeffect / frame_1 / DoAction.as
Encoding:
Text File  |  2007-09-28  |  667 b   |  27 lines

  1. this.bubcount = 0;
  2. this.onEnterFrame = function()
  3. {
  4.    var _loc2_ = random(10);
  5.    if(_loc2_ < 1)
  6.    {
  7.       t = this.attachMovie("bomtoons_bub2","bub",this.bubcount);
  8.       t._x = random(75) - 50;
  9.       t._y = random(this.height);
  10.       t._xscale = random(30) + 20;
  11.       t._yscale = t._xscale;
  12.       t.Xvel = this._parent._parent.dude.Xvel;
  13.       t.onEnterFrame = function()
  14.       {
  15.          if(this.sett != true)
  16.          {
  17.             this.Yvel = random(10);
  18.             this.sett = true;
  19.          }
  20.          this._x -= this.Xvel;
  21.          this.Xvel *= 0.99;
  22.          this._y -= this.Yvel + 5;
  23.       };
  24.       this.bubcount += 1;
  25.    }
  26. };
  27.