home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / miffyrecipe.swf / scripts / DefineSprite_242 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  484 b   |  25 lines

  1. function add_one()
  2. {
  3.    got_fruit += 1;
  4.    if(num_fruit >= got_fruit)
  5.    {
  6.       var fclip = eval(num_fruit + which_fruit + got_fruit);
  7.       fclip.gotoAndStop(2);
  8.       if(got_fruit == num_fruit)
  9.       {
  10.          _root.got_all_fruit();
  11.       }
  12.    }
  13. }
  14. function minus_one()
  15. {
  16.    if(0 < got_fruit)
  17.    {
  18.       var fclipname = num_fruit + which_fruit + got_fruit;
  19.       var fclip = eval(fclipname);
  20.       fclip.gotoAndStop(1);
  21.       got_fruit -= 1;
  22.    }
  23. }
  24. stop();
  25.