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

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck, Navigate, currMarker, Choice, StartingLine
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "drinks"
  5.   end if
  6.   if OnceCheck = 0 then
  7.     cursor(-1)
  8.     repeat with i = 6 to 8
  9.       set the cursor of sprite i to [34, 35]
  10.     end repeat
  11.     if (Navigate = "ABC") or (Navigate = "alco") then
  12.       set z to the number of lines in field currMarker
  13.       repeat with i = 1 to z
  14.         if line i of field currMarker = Choice then
  15.           set StartingLine to i
  16.           set y to i
  17.           if (z - i) < 17 then
  18.             set StartingLine to z - 17
  19.             if StartingLine < 1 then
  20.               set StartingLine to 1
  21.             end if
  22.           end if
  23.           set y to y - StartingLine + 1
  24.           set x to 20 + (y * 21)
  25.           puppetSprite(5, 1)
  26.           set the locV of sprite 5 to x
  27.           exit repeat
  28.         end if
  29.       end repeat
  30.     end if
  31.     set the text of field "currScroll" to line StartingLine to StartingLine + 17 of field currMarker
  32.     repeat with i = 42 to 48
  33.       puppetSprite(i, 1)
  34.     end repeat
  35.     set OnceCheck to 1
  36.   end if
  37.   go(the frame)
  38. end
  39.  
  40. on mouseDown
  41.   global checkPress
  42.   set checkPress to the clickOn
  43.   set bDown to the clickOn
  44.   if bDown > 41 then
  45.     buttonPressedDown(bDown, "drinks")
  46.   end if
  47. end
  48.  
  49. on mouseUp
  50.   global StartingLine, checkPress
  51.   set checkPress2 to the clickOn
  52.   if checkPress = checkPress2 then
  53.     set bUp to the clickOn
  54.     if bUp > 41 then
  55.       buttonPressedUp(bUp, "drinks")
  56.     end if
  57.   end if
  58. end
  59.