home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / tunnelrush.swf / scripts / DefineSprite_35 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-12  |  475 b   |  30 lines

  1. _alpha = 0;
  2. x = _X;
  3. y = _Y;
  4. onEnterFrame = function()
  5. {
  6.    a = Math.round(_parent.percent) + " %";
  7.    _X = x;
  8.    _Y = y;
  9.    _X = _X + (random(2) - 0.5);
  10.    _Y = _Y + (random(2) - 0.5);
  11.    _xscale = 120;
  12.    _yscale = _xscale;
  13.    if(this.top)
  14.    {
  15.       this._alpha -= 2;
  16.    }
  17.    if(!this.top)
  18.    {
  19.       this._alpha += 2;
  20.    }
  21.    if(this._alpha >= 100)
  22.    {
  23.       this.top = true;
  24.    }
  25.    if(this._alpha <= 0)
  26.    {
  27.       this.top = false;
  28.    }
  29. };
  30.