home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / office95 / shared.dir / 01000_Script_1000 < prev   
Text File  |  1995-10-16  |  4KB  |  163 lines

  1. on startmovie
  2.   global autoMode,pauseSprite,previousSprite,nextSprite,menuSprite,quitSprite
  3.   put 45 into menuSprite
  4.   put 47 into pauseSprite 
  5.   put 46 into previousSprite
  6.   put 48 into nextSprite
  7.   put 44 into quitSprite -- not used in this demo
  8.   put true into autoMode
  9. end
  10.  
  11. on initSprites
  12.   global pauseSprite,previousSprite,nextSprite,menuSprite,quitSprite
  13.   puppetSprite pauseSprite,true
  14.   puppetSprite previousSprite,true
  15.   puppetSprite nextSprite,true
  16.   puppetSprite quitSprite,true
  17.   puppetSprite menuSprite,true
  18. end
  19.  
  20. on turnOffSprites
  21.   global pauseSprite,previousSprite,nextSprite,menuSprite,quitSprite
  22.   puppetSprite pauseSprite,false
  23.   puppetSprite previousSprite,false
  24.   puppetSprite nextSprite,false
  25.   puppetSprite quitSprite,false
  26.   puppetSprite menuSprite,false
  27. end
  28.  
  29. on pauseMode
  30.   global autoMode,pauseSprite,nextSprite
  31.   
  32.   if autoMode then
  33.     sound stop 2
  34.     put false into autoMode
  35.     set the castNum of sprite pauseSprite to the castNum of sprite pauseSprite + 1
  36.     updateStage
  37.     pause
  38.   else
  39.     put true into autoMode
  40.     set the castNum of sprite pauseSprite to the castNum of sprite pauseSprite - 1
  41.     updateStage
  42.     go frame marker(0)
  43.   end if
  44. end
  45.  
  46. on goNext
  47.   global nextSprite,pauseSprite,autoMode
  48.   sound stop 2
  49.   set autoMode to true
  50.   set the castNum of sprite pauseSprite to the number of cast "pause"
  51.   depress nextSprite
  52.   go marker (1)
  53.   
  54. end
  55.  
  56. on goPrevious
  57.   global previousSprite,pauseSprite,autoMode
  58.   sound stop 2
  59.   set autoMode to true
  60.   set the castNum of sprite pauseSprite to the number of cast "pause"
  61.   depress previousSprite
  62.   go marker(-1)
  63. end
  64.  
  65. on goMenu
  66.   global menuSprite
  67.   sound stop 1
  68.   sound stop 2
  69.   depress menuSprite
  70.   turnOffSprites
  71.   put the moviename into theMovie
  72.   if theMovie = "ACCESS.DIR" then
  73.     put "ACMENU.DIR" into menuName
  74.   else if theMovie contains "ex" then
  75.     put "EXMENU.DIR" into menuName
  76.   else if theMovie contains "pp" then
  77.     put "PPMENU.DIR" into menuName
  78.   else if theMovie = "SCHED.DIR" then
  79.     put "SCMENU.DIR" into menuName
  80.   else if theMovie contains "wd" then
  81.     put "WDMENU.DIR" into menuName
  82.   else if theMovie contains "BUCKET" then
  83.     put "BUCMENU.DIR" into menuName
  84.   else if "NEW.DIR,CUP.DIR,VUP.DIR" contains theMovie then
  85.     put "INTRO.DIR" into menuName
  86.   end if
  87.   go frame "Menu" of movie menuName
  88. end
  89.  
  90. on goIntroMenu
  91.   global menuSprite
  92.   sound stop 2
  93.   depress menuSprite
  94.   turnOffSprites
  95.   go frame "Menu" of movie "intro.dir"
  96. end
  97.  
  98. on goCredits
  99.   sound stop 2
  100.   turnOffSprites
  101. end
  102.  
  103. on creditsQuit
  104.   global quitSprite
  105.   sound stop 2
  106.   depress quitSprite
  107.   turnOffSprites
  108.   go frame "exit"
  109. end
  110.  
  111. on depress whichSprite
  112.   put the ticks into startTime
  113.   set the castNum of sprite whichSprite to the castNum of sprite whichSprite + 1
  114.   repeat while the mouseDown or the ticks < startTime + 20
  115.     updatestage
  116.   end repeat
  117.   set the castNum of sprite whichSprite to the castNum of sprite whichSprite - 1
  118.   updateStage
  119. end
  120.  
  121. on playSound theSound
  122.   --cursor 4
  123.   --unLoadCast
  124.   --preload marker(1)
  125.   
  126.   if the machineType = 256 then
  127.     sound playFile 2, the pathname & "AUDIO\" & theSound
  128.   else
  129.     sound playFile 2, the pathname & "AUDIO:" & theSound
  130.   end if
  131.   
  132.   --puppetSound 2, cast theSound
  133.   
  134.   --cursor 0
  135. end playSound
  136.  
  137. on loadEmUp
  138.   cursor 4
  139.   --preload marker(1)
  140.   cursor 0
  141. end loadEmUp
  142.  
  143. on doPause length
  144.   if length > 10 then
  145.     set endPause = the ticks + length 
  146.   else
  147.     set endPause = the ticks + (length*60) -- converts length from seconds to ticks
  148.   end if
  149.   repeat while the ticks < endPause
  150.     if the commandDown then
  151.       exit repeat
  152.     else if the mouseDown then
  153.       exit repeat
  154.     end if
  155.     go the frame
  156.   end repeat
  157.   go the frame + 1
  158. end doPause
  159.  
  160. on waitSound
  161.   if soundBusy(2) then go to the frame
  162. end waitSound
  163.