home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / ntech.swf / scripts / DefineSprite_39 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  541 b   |  29 lines

  1. speedY = Math.random() * 4;
  2. DirX = Math.abs(Math.random() * 10);
  3. if(DirX >= 0 && DirX <= 5)
  4. {
  5.    speedX = Math.random() * 10;
  6. }
  7. else if(DirX > 5 && DirX <= 10)
  8. {
  9.    speedX = - Math.random() * 10;
  10. }
  11. this.onEnterFrame = function()
  12. {
  13.    if(this._y >= 7)
  14.    {
  15.       this._visible = 1;
  16.    }
  17.    else
  18.    {
  19.       this._visible = 0;
  20.    }
  21.    speedY -= 1;
  22.    this._y -= SpeedY / 7;
  23.    this._rotation -= 60;
  24.    if(this._y >= 400 || this._y <= -400 || this._x >= 400 || this._x <= -400)
  25.    {
  26.       this.unloadMovie();
  27.    }
  28. };
  29.