home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DemonicDefence3.swf / scripts / DefineSprite_911 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-09-27  |  475 b   |  25 lines

  1. if(farmo >= 210)
  2. {
  3.    farmo = 0;
  4.    _root.castleHp += 3;
  5.    if(_root.castleHp > _root.castleMaxHp)
  6.    {
  7.       _root.castleHp = _root.castleMaxHp;
  8.    }
  9. }
  10. _root.castleLife = _root.castleHp / _root.castleMaxHp * 100;
  11. if(_root.castleLife <= 0)
  12. {
  13.    _root.castleLife = 0;
  14.    _root.castleHp = 0;
  15.    _root.gameOvey._visible = true;
  16. }
  17. if(_root.castleLife != 100)
  18. {
  19.    setProperty(bar, _yscale, _root.castleLife);
  20. }
  21. else
  22. {
  23.    setProperty(bar, _yscale, 100);
  24. }
  25.