home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / tall-ships.swf / scripts / DefineSprite_471 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-09-29  |  307 b   |  13 lines

  1. this.speed = 4;
  2. this.onEnterFrame = function()
  3. {
  4.    if(this._x > 1000)
  5.    {
  6.       this._x = -5 - Math.floor(Math.random() * 400);
  7.       this._y = 200 + Math.floor(Math.random() * 700);
  8.       this.speed = Math.random();
  9.    }
  10.    this._x += 2 + 2 * this.speed;
  11.    this._y -= 1 + 1 * this.speed;
  12. };
  13.