home *** CD-ROM | disk | FTP | other *** search
/ The Complete Interactive Cookbook / L1_JS_101199.ISO / TOURGUID / COOKTG.DIR / 00012.ls < prev    next >
Encoding:
Text File  |  1996-10-29  |  1.0 KB  |  45 lines

  1. on initializeDemo
  2.   global pauseSprite, gPaused, gContinued
  3.   set pauseSprite to 47
  4.   set gPaused to 0
  5.   set gContinued to 0
  6. end
  7.  
  8. on waitSound whichChannel
  9.   repeat while soundBusy(whichChannel) and not (the mouseDown)
  10.     updateStage()
  11.   end repeat
  12.   checkPassClick()
  13. end
  14.  
  15. on waitVideo whichSprite
  16.   set the movieTime of sprite whichSprite to 0
  17.   set the movieRate of sprite whichSprite to 1
  18.   repeat while (the movieRate of sprite whichSprite > 0) and not (the mouseDown) and not (the movieTime of sprite whichSprite >= the duration of cast the castNum of sprite whichSprite)
  19.     updateStage()
  20.   end repeat
  21.   checkPassClick()
  22. end
  23.  
  24. on waitTicks howMany
  25.   set startTicks to the ticks
  26.   repeat while the ticks < (startTicks + howMany)
  27.     updateStage()
  28.   end repeat
  29. end
  30.  
  31. on checkPassClick
  32.   global gPaused, gContinued, pauseSprite
  33.   if gPaused then
  34.     if the clickOn = pauseSprite then
  35.       continueDemo()
  36.     end if
  37.   else
  38.     if gContinued then
  39.       if the clickOn = pauseSprite then
  40.         pauseDemo()
  41.       end if
  42.     end if
  43.   end if
  44. end
  45.