home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / multi / singing / baritone.dxr / 00003_StandView.ls < prev    next >
Encoding:
Text File  |  1996-06-12  |  2.2 KB  |  96 lines

  1. on exitFrame
  2.   UpdateCursor([[l(), LC()], [R(), RC()], [4, OC()], [LHSpageEdge(), OpenHandCursor()], [RHSpageEdge(), OpenHandCursor()], [5, OC()], [6, OC()], [7, OC()], [8, OC()], [9, OC()]])
  3.   go(the frame)
  4. end
  5.  
  6. on LapTopIcon
  7.   return 41
  8. end
  9.  
  10. on upperH
  11.   return 470
  12. end
  13.  
  14. on lowerH
  15.   return 160
  16. end
  17.  
  18. on DraggingPage beforeH, startH
  19.   SelectCursor(ClosedHandCursor())
  20.   repeat while the mouseDown
  21.     set desiredH to beforeH + (the mouseH - startH)
  22.     if (desiredH > lowerH()) and (desiredH < upperH()) then
  23.       set the locH of sprite InHandSprite() to desiredH
  24.       updateStage()
  25.     end if
  26.   end repeat
  27.   OpenHandCursor()
  28. end
  29.  
  30. on SnapPage theCast
  31.   set SnapToLHS to the locH of sprite InHandSprite() < 320
  32.   KillBitMap(InHandSprite())
  33.   if SnapToLHS then
  34.     push(LHSpile, theCast)
  35.   else
  36.     push(RHSpile, theCast)
  37.   end if
  38. end
  39.  
  40. on RHSGrabDrag s, startH, startV
  41.   global LHSpile, RHSpile
  42.   set beforeH to the locH of sprite s
  43.   set beforeV to the locV of sprite s
  44.   set theCast to pop(RHSpile)
  45.   InstallBitMap(InHandSprite(), theCast, beforeH, beforeV)
  46.   DraggingPage(beforeH, startH)
  47.   SnapPage(theCast)
  48. end
  49.  
  50. on LHSGrabDrag s, startH, startV
  51.   global LHSpile, RHSpile
  52.   set beforeH to the locH of sprite s
  53.   set beforeV to the locV of sprite s
  54.   set theCast to pop(LHSpile)
  55.   InstallBitMap(InHandSprite(), theCast, beforeH, beforeV)
  56.   DraggingPage(beforeH, startH)
  57.   SnapPage(theCast)
  58. end
  59.  
  60. on mouseDown
  61.   global RHSpile, LHSpile, PagesLoaded
  62.   set spriteHit to the clickOn
  63.   set hitH to the mouseH
  64.   set hitV to the mouseV
  65.   if PointingAt(RHSpageEdge()) then
  66.     RHSGrabDrag(spriteHit, hitH, hitV)
  67.   end if
  68.   if PointingAt(LHSpageEdge()) then
  69.     LHSGrabDrag(spriteHit, hitH, hitV)
  70.   end if
  71.   if PointingAt(left()) then
  72.     if PagesLoaded then
  73.       FreeSprites(LHSpile)
  74.       FreeSprites(RHSpile)
  75.     end if
  76.     go("Main")
  77.   end if
  78.   if PointingAt(right()) then
  79.     if PagesLoaded then
  80.       set the locH of sprite 3 to 322
  81.       FreeSprites(LHSpile)
  82.       FreeSprites(RHSpile)
  83.     end if
  84.     set the volume of sound 1 to 255
  85.     set the volume of sound 2 to 255
  86.     go("Video")
  87.   end if
  88.   if p(4) then
  89.     sound playFile 1, "NICK.AIF"
  90.     play frame "song"
  91.     exit
  92.   end if
  93.   set YesLeft to PointingAt(LHStext())
  94.   set YesRight to PointingAt(RHStext())
  95. end
  96.