home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / snowball.swf / scripts / DefineSprite_221 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  524 b   |  27 lines

  1. cansmash = 1;
  2. this.onEnterFrame = function()
  3. {
  4.    if(_root.startmoving == 1)
  5.    {
  6.       this._y -= _root.snowball.yspeed;
  7.       if(_Y < -10 - _height)
  8.       {
  9.          _Y = 500;
  10.          _X = random(500);
  11.          cansmash = 1;
  12.       }
  13.    }
  14.    if(_root.snowball.detector.hitTest(this._x,this._y,true))
  15.    {
  16.       if(_root.weight < 1200)
  17.       {
  18.          _root.snowball.play();
  19.       }
  20.       else if(cansmash == 1)
  21.       {
  22.          _root.snowball.smashup = 1;
  23.          cansmash = 0;
  24.       }
  25.    }
  26. };
  27.