home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00392.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  1.1 KB  |  49 lines

  1. on soundControl a, b, c
  2.   global theLocH, theLocV, windCast
  3.   stopSound(1, 10)
  4.   set me to the clickOn
  5.   if the castNum of sprite me = c then
  6.     if the mouseH > the locH of sprite me then
  7.       set castNum to b
  8.     else
  9.       set castNum to a
  10.     end if
  11.   else
  12.     if the castNum of sprite me = b then
  13.       if the mouseH > the locH of sprite me then
  14.         set castNum to c
  15.       else
  16.         set castNum to a
  17.       end if
  18.     else
  19.       set castNum to b
  20.     end if
  21.   end if
  22.   set the castNum of sprite me to castNum
  23.   repeat while the mouseDown
  24.     updateStage()
  25.   end repeat
  26.   if rollOver(me) then
  27.     if the castNum of sprite me = b then
  28.       Xsound("status")
  29.       put the result
  30.       if the result = "true" then
  31.         Xsound("pause")
  32.         go(the frame + 1)
  33.       end if
  34.     else
  35.       if the castNum of sprite me = a then
  36.         set the castNum of sprite me to c
  37.         go("Start", "Color")
  38.       else
  39.         updateStage()
  40.         Xsound("pause")
  41.         pause()
  42.       end if
  43.     end if
  44.   else
  45.     set the castNum of sprite me to b
  46.     updateStage()
  47.   end if
  48. end
  49.