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

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