home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / star.swf / scripts / DefineSprite_167_card2 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  698 b   |  45 lines

  1. xs = 0.7 * r.espeed;
  2. y = _Y;
  3. name = "card2";
  4. d = 20;
  5. if(_parent._name == "enemymap")
  6. {
  7.    initme();
  8. }
  9. else
  10. {
  11.    onenterframe = function()
  12.    {
  13.       d--;
  14.       if(d < 0)
  15.       {
  16.          _X = _X + 2 * xs;
  17.          c._rotation -= 20;
  18.       }
  19.       else
  20.       {
  21.          _X = _X + xs;
  22.          _xscale = _xscale * 1.03;
  23.          _yscale = _yscale * 1.03;
  24.       }
  25.       cekhit();
  26.       if(hit)
  27.       {
  28.          gotoAndPlay(5);
  29.       }
  30.       if(!r.inv)
  31.       {
  32.          if(s.hittest(_X,_Y,1))
  33.          {
  34.             r.hit = 1;
  35.             gotoAndPlay(5);
  36.          }
  37.       }
  38.       if(_X < -30)
  39.       {
  40.          this.removeMovieClip();
  41.       }
  42.    };
  43. }
  44. stop();
  45.