home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / shared.dir / 03019_Script_PRELOAD < prev    next >
Text File  |  1996-06-21  |  2KB  |  90 lines

  1. -- ---------------------------------------------------------------
  2. -- Handler preloadTo 
  3.  
  4. on preloadTo  subSectionEnd, interruptFlag
  5.   watchCursor
  6.   
  7.   if interruptFlag then setAnimationInterruptable(subSectionEnd)
  8.   unload 1, the frame
  9.   preload the frame + 1, subSectionEnd
  10.   
  11.   normalCursor
  12. end
  13.  
  14. -- ---------------------------------------------------------------
  15. -- Handler ProcessFramePreloadToSpecial preloads part of an animation
  16. -- but goes to the end of the whole animation when interrupted
  17.  
  18. on ProcessFramePreloadToSpecial subSectionEnd, interruptFlag, animationEnd
  19.   watchCursor
  20.   
  21.   if interruptFlag then setAnimationInterruptable(animationEnd)
  22.   unload 1 , the frame
  23.   preload the frame + 1, subSectionEnd
  24.   ProcessFrame
  25.   normalCursor
  26.   
  27. end
  28.  
  29. -- ---------------------------------------------------------------
  30. -- Handler PreloadToSpecial preloads part of an animation
  31. -- but goes to the end of the whole animation when interrupted
  32.  
  33. on PreloadToSpecial subSectionEnd, interruptFlag, animationEnd
  34.   watchCursor
  35.   
  36.   if interruptFlag then setAnimationInterruptable(animationEnd)
  37.   unload 1 , the frame
  38.   preload the frame + 1, subSectionEnd
  39.   normalCursor
  40.   
  41. end
  42.  
  43.  
  44.  
  45.  
  46.  
  47. -- Handler interruptAnimation 
  48.  
  49. on interruptAnimation
  50.   global animationEndMarker, menuBar
  51.   global button1TextSprite, button2TextSprite, button3TextSprite
  52.   
  53.   -- get a temp value in case the next marker is also an animation
  54.   set toMarker = animationEndMarker
  55.   
  56.   -- clear the globals
  57.   set animationEndMarker = EMPTY
  58.   set the mouseDownScript = EMPTY
  59.   if menuBar&&button1TextSprite&&button2TextSprite&&button3TextSprite contains string(the clickon) then
  60.     doMenuClicked 
  61.   else
  62.     go toMarker
  63.     pass
  64.   end if
  65. end  
  66.  
  67. -- ---------------------------------------------------------------
  68. -- Handler setAnimationInterruptable
  69.  
  70. on setAnimationInterruptable subSectionEnd
  71.   global animationEndMarker
  72.   
  73.   set animationEndMarker = subSectionEnd
  74.   set the mouseDownScript = "interruptAnimation"
  75. end
  76.  
  77. -- ---------------------------------------------------------------
  78. -- Handler setMouseDownScriptEmpty for animations that are not
  79. -- interrupted.
  80.  
  81. on setMouseDownScriptEmpty
  82.   set the mouseDownScript = EMPTY
  83. end
  84.  
  85. -- ---------------------------------------------------------------
  86. -- Handler endAnimation 
  87.  
  88. on endAnimation
  89.   setMouseDownScriptEmpty
  90. end