home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / midnightstrike1.swf / scripts / DefineSprite_18 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-04-02  |  639 b   |  19 lines

  1. var a = Math.random() * 2 * 3.141592653589793;
  2. this._x = Math.sin(a) * 60 + 10 * Math.random();
  3. this._y = Math.cos(a) * 60 + 10 * Math.random();
  4. this.age = 0;
  5. this.onEnterFrame = function()
  6. {
  7.    this._x += (Math.random() - 0.5) * 1;
  8.    this._y -= Math.random() * 5;
  9.    if(int(this.age) < 10)
  10.    {
  11.       this.age = int(this.age) + 1;
  12.    }
  13.    var _loc2_ = Math.random() * 9 * this.age + 40;
  14.    _loc2_ *= Math.max(0,this.age - 27);
  15.    this._xscale = this._yscale = _loc2_;
  16.    this.gotoAndStop(int(Math.min(this._totalframes,Math.max(2,int(Math.random() * 5) + this.age * 2.7))));
  17.    this._rotation = Math.random() * 360;
  18. };
  19.