home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_68_tarinfo2.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  1.0 KB  |  31 lines

  1. on mouseUp
  2.   global Choice, RecipeNum
  3.   if the visible of sprite 21 then
  4.     set currLine to the mouseLine
  5.     set ing to line currLine of field "TarInfo2"
  6.     if field ("fieldRecipe" & RecipeNum) contains word 1 of ing then
  7.       set l1 to the number of lines in field "shop1"
  8.       if the text of field "shop1" = EMPTY then
  9.         set l1 to 0
  10.       end if
  11.       set l2 to the number of lines in field "shop2"
  12.       if the text of field "shop2" = EMPTY then
  13.         set l2 to 0
  14.       end if
  15.       if (the text of field "shop2" contains ing) = 0 then
  16.         put Choice into line l1 + 1 of field "shop1"
  17.         put ing into line l2 + 1 of field "shop2"
  18.         set x to the number of lines in field "shop1"
  19.         if x < 11 then
  20.           set the scrollTop of member "shop1" to 0
  21.           set the scrollTop of member "shop2" to 0
  22.         else
  23.           set y to the height of member "shop1" / x
  24.           set the scrollTop of member "shop1" to y * (x - 10)
  25.           set the scrollTop of member "shop2" to y * (x - 10)
  26.         end if
  27.       end if
  28.     end if
  29.   end if
  30. end
  31.