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

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck, Navigate, RecipeNum
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "drinks"
  5.   end if
  6.   set NonVec to [148, 127, 132, 131, 128, 129, 133, 130]
  7.   if OnceCheck = 0 then
  8.     cursor(-1)
  9.     set OnceCheck to 1
  10.     repeat with i = 3 to 10
  11.       set the cursor of sprite i to [34, 35]
  12.       puppetSprite(i, 1)
  13.     end repeat
  14.     repeat with i = 42 to 48
  15.       puppetSprite(i, 1)
  16.     end repeat
  17.     if Navigate = "non-alco" then
  18.       set x to getPos(NonVec, RecipeNum)
  19.       if x > 0 then
  20.         set the member of sprite (x + 2) to member ("non" & x) of castLib "drinks"
  21.       end if
  22.     end if
  23.   end if
  24.   set chosen to getPos(NonVec, RecipeNum)
  25.   repeat with i = 3 to 10
  26.     if the member of sprite i = "origin" = 0 then
  27.       if (rollOver(i) = 0) and not ((Navigate = "non-alco") and (i = (chosen + 2))) then
  28.         set the member of sprite i to member "origin"
  29.       end if
  30.     end if
  31.   end repeat
  32.   go(the frame)
  33. end
  34.  
  35. on mouseDown
  36.   global checkPress, Navigate
  37.   set checkPress to the clickOn
  38.   set bDown to the clickOn
  39.   if (bDown > 2) and (bDown < 11) then
  40.     if Navigate = "non-alco" then
  41.       repeat with i = 3 to 10
  42.         if rollOver(i) = 0 then
  43.           set the member of sprite i to member "origin"
  44.         end if
  45.       end repeat
  46.     end if
  47.     set the member of sprite bDown to member ("non" & bDown - 2) of castLib "drinks"
  48.   else
  49.     if bDown > 41 then
  50.       buttonPressedDown(bDown, "non-alco")
  51.     end if
  52.   end if
  53. end
  54.  
  55. on mouseUp
  56.   global checkPress, RecipeNum, Choice
  57.   set checkPress2 to the clickOn
  58.   if checkPress = checkPress2 then
  59.     set bUp to the clickOn
  60.     if (bUp > 2) and (bUp < 11) then
  61.       clearPuppets()
  62.       set NonVec to [148, 127, 132, 131, 128, 129, 133, 130]
  63.       set RecipeNum to getAt(NonVec, bUp - 2)
  64.       set x to the number of lines in field "backField"
  65.       put marker(0) into line x + 1 of field "backField"
  66.       set Choice to line RecipeNum of field "names"
  67.       go(marker("non-alcoP"))
  68.     else
  69.       if bUp > 41 then
  70.         buttonPressedUp(bUp, "non-alco")
  71.       end if
  72.     end if
  73.   end if
  74. end
  75.