home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_70_foodinfo2temp.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  1.0 KB  |  29 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 "FoodInfo2Temp"
  6.     if (field ("fieldRecipe" & RecipeNum) contains word 1 of ing) and (char 1 of ing <> " ") and ((field "shop2" contains ing) = 0) then
  7.       set l1 to the number of lines in field "shop1"
  8.       if the text of field "shop1" = 0 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" = 0 then
  13.         set l2 to 0
  14.       end if
  15.       put Choice into line l1 + 1 of field "shop1"
  16.       put ing into line l2 + 1 of field "shop2"
  17.       set x to the number of lines in field "shop1"
  18.       if x < 11 then
  19.         set the scrollTop of member "shop1" to 0
  20.         set the scrollTop of member "shop2" to 0
  21.       else
  22.         set y to the height of member "shop1" / x
  23.         set the scrollTop of member "shop1" to y * (x - 10)
  24.         set the scrollTop of member "shop2" to y * (x - 10)
  25.       end if
  26.     end if
  27.   end if
  28. end
  29.