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

  1. on exitFrame
  2.   global SoundActive, gProgrmPathOnHD, OnceCheck
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "hang"
  5.   end if
  6.   if OnceCheck = 0 then
  7.     cursor(-1)
  8.     set OnceCheck to 1
  9.     repeat with i = 3 to 5
  10.       set the cursor of sprite i to [34, 35]
  11.       puppetSprite(i, 1)
  12.     end repeat
  13.     repeat with i = 42 to 48
  14.       puppetSprite(i, 1)
  15.     end repeat
  16.   end if
  17.   go(the frame)
  18. end
  19.  
  20. on mouseDown
  21.   global checkPress
  22.   set checkPress to the clickOn
  23.   set bDown to the clickOn
  24.   if (bDown = 3) or (bDown = 4) or (bDown = 5) then
  25.     repeat with i = 3 to 5
  26.       if i = bDown then
  27.         set the member of sprite i to member ("hang" & bDown - 2)
  28.         next repeat
  29.       end if
  30.       set the member of sprite i to member "origin"
  31.     end repeat
  32.   else
  33.     if bDown > 41 then
  34.       buttonPressedDown(bDown, "hangOver")
  35.     end if
  36.   end if
  37. end
  38.  
  39. on mouseUp
  40.   global checkPress
  41.   set checkPress2 to the clickOn
  42.   if checkPress = checkPress2 then
  43.     set bUp to the clickOn
  44.     if (bUp = 3) or (bUp = 4) or (bUp = 5) then
  45.       set the visible of sprite 6 to 0
  46.       set the visible of sprite 7 to 0
  47.       set the visible of sprite 8 to 0
  48.       set the visible of sprite (bUp + 3) to 1
  49.     else
  50.       if bUp > 41 then
  51.         buttonPressedUp(bUp, "hangOver")
  52.       end if
  53.     end if
  54.   end if
  55. end
  56.