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

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck, Navigate
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "slides"
  5.   end if
  6.   if OnceCheck = 0 then
  7.     cursor(0)
  8.     puppetSprite(8, 1)
  9.     set the rect of sprite 8 to rect(1, 1, 1, 1)
  10.     set the cursor of sprite 8 to [34, 35]
  11.     set OnceCheck to 1
  12.     repeat with i = 2 to 7
  13.       puppetSprite(i, 1)
  14.     end repeat
  15.     repeat with i = 3 to 5
  16.       set the cursor of sprite i to [34, 35]
  17.     end repeat
  18.     repeat with i = 42 to 48
  19.       puppetSprite(i, 1)
  20.     end repeat
  21.     set the locV of sprite 2 to -100
  22.     updateStage()
  23.     set the visible of sprite 2 to 1
  24.     if Navigate = "food" then
  25.       set the member of sprite 5 to member "enter3"
  26.       set the member of sprite 7 to member "text3"
  27.       set the rect of sprite 8 to the rect of sprite 7
  28.       repeat with i = 9 to 20
  29.         set the visible of sprite i to 1
  30.       end repeat
  31.       repeat with i = 22 to 28
  32.         set the visible of sprite i to 0
  33.       end repeat
  34.       set the locV of sprite 2 to value(field "SavedGlobals")
  35.     else
  36.       if Navigate = "partydrinks" then
  37.         set the member of sprite 4 to member "enter2"
  38.         set the member of sprite 6 to member "text2"
  39.         set the rect of sprite 8 to the rect of sprite 6
  40.         repeat with i = 9 to 20
  41.           set the visible of sprite i to 0
  42.         end repeat
  43.         repeat with i = 22 to 28
  44.           set the visible of sprite i to 1
  45.         end repeat
  46.         set the locV of sprite 2 to value(field "SavedGlobals")
  47.       end if
  48.     end if
  49.   end if
  50.   set the cursor of sprite 8 to [34, 35]
  51.   go(the frame)
  52. end
  53.  
  54. on mouseDown
  55.   global checkPress
  56.   set checkPress to the clickOn
  57.   set bDown to the clickOn
  58.   if (bDown = 4) or (bDown = 5) or (bDown = 3) then
  59.     repeat with i = 3 to 5
  60.       if i = bDown then
  61.         set the member of sprite i to member ("enter" & bDown - 2)
  62.         next repeat
  63.       end if
  64.       set the member of sprite i to member "origin"
  65.     end repeat
  66.   else
  67.     if bDown > 41 then
  68.       buttonPressedDown(bDown, "enter")
  69.     end if
  70.   end if
  71. end
  72.  
  73. on mouseUp
  74.   global checkPress, Fade, Food, RecipeNum, Choice
  75.   set the locV of sprite 2 to -100
  76.   set checkPress2 to the clickOn
  77.   if checkPress = checkPress2 then
  78.     set bUp to the clickOn
  79.     if bUp = 4 then
  80.       set the member of sprite 7 to member "origin"
  81.       set the member of sprite 6 to member "text2"
  82.       repeat with i = 9 to 20
  83.         set the visible of sprite i to 0
  84.       end repeat
  85.       repeat with i = 22 to 28
  86.         set the visible of sprite i to 1
  87.       end repeat
  88.       set the rect of sprite 8 to the rect of sprite 6
  89.     else
  90.       if bUp = 5 then
  91.         set the member of sprite 6 to member "origin"
  92.         set the member of sprite 7 to member "text3"
  93.         repeat with i = 9 to 20
  94.           set the visible of sprite i to 1
  95.         end repeat
  96.         repeat with i = 22 to 28
  97.           set the visible of sprite i to 0
  98.         end repeat
  99.         set the rect of sprite 8 to the rect of sprite 7
  100.       else
  101.         if bUp = 3 then
  102.           set x to the number of lines in field "backField"
  103.           put marker(0) into line x + 1 of field "backField"
  104.           set Fade to 0
  105.           clearPuppets()
  106.           go(marker("party"))
  107.         else
  108.           if (bUp > 8) and (bUp < 21) then
  109.             set the locV of sprite 2 to the locV of sprite bUp
  110.             updateStage()
  111.             set the text of field "savedGlobals" to the locV of sprite 2 & EMPTY
  112.             set Food to "food" & bUp - 8
  113.             set x to the number of lines in field "backField"
  114.             put marker(0) into line x + 1 of field "backField"
  115.             clearPuppets()
  116.             go(marker("foodP"))
  117.           else
  118.             if (bUp > 21) and (bUp < 29) then
  119.               set the locV of sprite 2 to the locV of sprite bUp
  120.               updateStage()
  121.               set the text of field "savedGlobals" to the locV of sprite 2 & EMPTY
  122.               startTimer()
  123.               repeat while the timer < 20
  124.               end repeat
  125.               set drinkVec to [142, 148, 144, 143, 145, 146, 147]
  126.               set RecipeNum to getAt(drinkVec, bUp - 21)
  127.               set Choice to line RecipeNum of field "names"
  128.               set x to the number of lines in field "backField"
  129.               put marker(0) into line x + 1 of field "backField"
  130.               clearPuppets()
  131.               go(marker("entDrinksP"))
  132.             else
  133.               if bUp > 41 then
  134.                 buttonPressedUp(bUp, "enter")
  135.               end if
  136.             end if
  137.           end if
  138.         end if
  139.       end if
  140.     end if
  141.   end if
  142. end
  143.