home *** CD-ROM | disk | FTP | other *** search
/ A Virtual Reality Guide to Texas / CD.iso / texdata / shared.cst / 00002_a startmovie script.ls < prev    next >
Encoding:
Text File  |  1998-06-17  |  9.3 KB  |  341 lines

  1. --on StartMovie
  2. --  Global gNeedsStarting, gSyncToFrame,gpausetime, gDwnSnd  
  3. --  clearglobals
  4. --  
  5. --  put true into gNeedsStarting
  6. --  put true into gSyncToFrame
  7. --  put 2000 into gpausetime
  8. --  
  9. --  set the cursor of sprite 5 to [1,2]
  10. --  set the cursor of sprite 6 to [1,2]
  11. --  set the cursor of sprite 7 to [1,2]
  12. --  
  13. --  set the volume of sound 2 to 200
  14. --  set the volume of sound 3 to 150
  15. --  set the volume of sound 1 to 255
  16. --  
  17. --  repeat with i = 11 to 16
  18. --    set the cursor of sprite i to [1,2]
  19. --  end repeat
  20. --  
  21. --  preLoadMember member "button.aif"
  22. --  put the number of member "button.aif" into gDwnSnd
  23. --  
  24. --  set the exitLock to TRUE
  25. --end
  26. --
  27. --on keyDown
  28. --  if the optionDown and the key = "Q" and the exitLock = TRUE then 
  29. --    clearSprites
  30. --    if the castNum of sprite 48 then pauseMovie
  31. --    go "quitFrame"
  32. --  end if
  33. --end
  34. ----------------------------------------------------------------
  35. --
  36. --on ButtonDown DoWhat
  37. --  global gFrame 
  38. --  put the clickon into MySprite
  39. --  put mysprite + 6 into flashsprite
  40. --  put the castNum of sprite MySprite into rollstate
  41. --  put the castNum of sprite flashsprite into flashupstate
  42. --  put rollstate + 1 into DownState
  43. --  put downstate - 2 into upState
  44. --  if not(the name of member flashupstate contains ".on") then
  45. --    put flashupstate + 1 into flashdownstate -- the green lights
  46. --    --put "buttondown"
  47. --  else
  48. --    put flashupstate into flashdownstate
  49. --  end if
  50. --  
  51. --  PuppetSprite MySprite, True
  52. --  puppetsprite flashsprite, True
  53. --  put True into DoMe
  54. --  repeat while the stillDown
  55. --    put Rollover(MySprite) into DoMe
  56. --    if DoMe then
  57. --      set the castNum of sprite MySprite to DownState
  58. --      set the castnum of sprite flashsprite to flashdownstate
  59. --    else
  60. --      set the castNum of sprite MySprite to rollstate
  61. --      set the castNum of sprite flashsprite to flashupstate
  62. --    end if
  63. --    UpdateStage
  64. --  end repeat
  65. --  
  66. --  puppetsprite 10, false -- this turns off the rollover preview in QT area
  67. --  PuppetSprite MySprite, False
  68. --  puppetsprite flashsprite, false
  69. --  UpdateStage
  70. --  
  71. --  --  repeat while soundBusy(1) or soundBusy(2)
  72. --  --    nothing
  73. --  --  end repeat
  74. --  
  75. --  if DoMe then
  76. --    clearSprites
  77. --    if the castNum of sprite 48 then pauseMovie  
  78. --    put the ticks into temp
  79. --    repeat while the ticks < temp + 60
  80. --      updateStage
  81. --    end repeat
  82. --    
  83. --    if not VoidP(DoWhat) then do DoWhat
  84. --    
  85. --  else
  86. --    if the castNum of sprite 48 then unpauseMovie
  87. --  end if
  88. --end ButtonDown
  89. --
  90. ----------------------------------------------------------------
  91. --on BulletDown DoWhat
  92. --  
  93. --  put the clickon into MySprite
  94. --  
  95. --  put the castNum of sprite MySprite into rollstate
  96. --  
  97. --  --put the name of member rollstate
  98. --  put rollstate + 1 into DownState
  99. --  put rollstate - 1 into upState
  100. --  
  101. --  if the clickon = 23 then -- special case for restart button
  102. --    put 65 into rollstate  -- cast numbers for restart buttons
  103. --    put 67 into DownState
  104. --    put 66 into upState    
  105. --  end if
  106. --  
  107. --  PuppetSprite MySprite, True
  108. --  put True into DoMe
  109. --  repeat while the stillDown
  110. --    put Rollover(MySprite) into DoMe
  111. --    if DoMe then
  112. --      set the castNum of sprite MySprite to DownState
  113. --    else
  114. --      set the castNum of sprite MySprite to rollstate
  115. --    end if
  116. --    UpdateStage
  117. --  end repeat
  118. --  
  119. --  puppetsprite 9, false
  120. --  puppetsprite 10, false -- this turns off the rollover preview in QT area
  121. --  PuppetSprite MySprite, False --turn off the clicked button
  122. --  
  123. --  UpdateStage
  124. --  if DoMe then
  125. --    if the castnum of sprite 48 then 
  126. --      pauseMovie
  127. --      puppetSound 1, "button.aif"
  128. --      updateStage
  129. --    end if
  130. --    
  131. --    repeat while soundBusy(1)
  132. --      updateStage
  133. --    end repeat
  134. --    
  135. --    if not VoidP(DoWhat) then do DoWhat
  136. --  end if
  137. --end BulletDown
  138. --
  139. ----------------------------------------------------------------
  140. --On PlayAsync TheCastName
  141. --  puppetSound TheCastName
  142. --  UpdateStage
  143. --end PlayAsync
  144. --
  145. ----------------------------------------------------------------
  146. --On PlaySync TheCastName
  147. --  PlayAsync TheCastName
  148. --  repeat while soundBusy(1)
  149. --    UpdateStage
  150. --  end repeat
  151. --  PuppetSound 0
  152. --end PlaySync
  153. --
  154. ----------------------------------------------------------------
  155. --on MoveTo WhichSprite, StartPoint, EndPoint, Steps
  156. --  PuppetSprite WhichSprite, True
  157. --  put getAt(StartPoint, 1) into startX
  158. --  put getAt(StartPoint, 2) into startY
  159. --  put getAt(EndPoint, 1) into endX
  160. --  put getAt(EndPoint, 2) into endY
  161. --  
  162. --  put "Playing from original"
  163. --  
  164. --  put (endX - startX)/float(steps) into PixPerStepX
  165. --  put (endy - startY)/float(steps) into PixPerStepY
  166. --  
  167. --  repeat with n = 1 to Steps
  168. --    put StartX + (n * PixPerStepX) into NewX
  169. --    put StartY + (n * PixPerStepY) into NewY
  170. --    set the locH of sprite WhichSprite to NewX
  171. --    set the locV of sprite WhichSprite to NewY
  172. --    UpdateStage
  173. --  end repeat
  174. --end MoveTo
  175. --
  176. ----------------------------------------------------------------
  177. --on UpdateVolume
  178. --  put the SoundLevel into SL
  179. --  put the top of sprite 5 into TheTop
  180. --  put the Bottom of sprite 5 into TheBottom
  181. --  put TheBottom - TheTop into tDist
  182. --  put SL/7.0 into VDist
  183. --  put TheBottom - (VDist *tDist) into NewV
  184. --  PuppetSprite 8, True
  185. --  set the LocV of sprite 8 to NewV
  186. --  UpdateStage
  187. --  if the frame <> 1 then beep
  188. --end
  189. --
  190. --on PauseMovie
  191. --  Global gPause
  192. --  put True into gPause
  193. --  UpdatePause
  194. --end
  195. --
  196. --on UnPauseMovie
  197. --  Global gPause
  198. --  put False into gPause
  199. --  UpdatePause
  200. --end
  201. --
  202. --on VerifyFrame  Where
  203. --  Global gSyncToFrame, gPause, gNeedsStarting, gFrameDir
  204. --  if the castnum of sprite 48 then
  205. --    put Marker(0) into MOffset
  206. --    put count(Where) into NoItems
  207. --    put the movieTime of sprite 48 into MyPoint
  208. --    put the movieRate of sprite 48 into AmRunning
  209. --    put the frame into MyFrame
  210. --    
  211. --    if gSyncToFrame then
  212. --      
  213. --      if MyPoint < 0 and gFrameDir = -1 then --? for CJ: why reset QT?
  214. --        --        pauseMovie
  215. --        --        go marker(-1)
  216. --        --        unpauseMovie
  217. --      else
  218. --        put gFrameDir into NewPos
  219. --        put MyFrame - MOffset + NewPos into MyRel
  220. --        if MyRel < 1 then put 1 into MyRel
  221. --        if MyRel > NoItems then put NoItems into MyRel
  222. --        
  223. --        put GetAt(Where, MyRel) into NewTime
  224. --        put the duration of cast the castnum of sprite 48 into MaxTime
  225. --        if NewTime > MaxTime then put MaxTime- 3 into NewTime
  226. --        put "Point:" & MyRel && NewTime
  227. --        
  228. --        PauseMovie
  229. --        set the movieTime of sprite 48 to NewTime
  230. --        unPauseMovie
  231. --        set gPause = 1
  232. --      end if
  233. --      put False into gSyncToFrame 
  234. --      
  235. --    else      
  236. --      repeat with n = 1 to NoItems
  237. --        put GetAt(Where, n) into CheckTime
  238. --        if CheckTime >= MyPoint then exit repeat
  239. --      end repeat      
  240. --      go (n + MOffset - 1)      
  241. --    end if
  242. --    
  243. --    if gPause then
  244. --      goto the frame
  245. --    else
  246. --      if the castnum of sprite 48 then
  247. --        put the duration of cast the castnum of sprite 48 into MyDur
  248. --        if MyPoint >= MyDur then 
  249. --          go marker(1)
  250. --          abort
  251. --        else
  252. --          go the frame
  253. --        end if    
  254. --      end if
  255. --    end if
  256. --  end if
  257. --end verifyFrame
  258. --
  259. ----------------------------------------------------------------
  260. --on isMovie WhatSprite
  261. --  put the castnum of sprite 48 into IsTrue
  262. --  return IsTrue
  263. --end
  264. ----------------------------------------------------------------
  265. --on doExit
  266. --  if isMovie(48) then PauseMovie
  267. --  quit
  268. --end
  269. ----------------------------------------------------------------
  270. --on doHelp
  271. --  Alert "Not available"
  272. --end
  273. ----------------------------------------------------------------
  274. --on doPrev
  275. --  Global gSyncToFrame, gNeedsStarting, gFrameDir
  276. --  put true into gNeedsStarting
  277. --  put true into gSyncToFrame 
  278. --  PauseMovie
  279. --  put -1 into gFrameDir
  280. --end
  281. ----------------------------------------------------------------
  282. --on doNext
  283. --  Global gSyncToFrame, gNeedsStarting, gFrameDir
  284. --  put true into gNeedsStarting
  285. --  put true into gSyncToFrame
  286. --  PauseMovie
  287. --  put 1 into gFrameDir
  288. --end
  289. ----------------------------------------------------------------
  290. --on DoPause
  291. --  Global gPause
  292. --  put not gPause into gPause
  293. --  UpdatePause
  294. --end
  295. ----------------------------------------------------------------
  296. --on UpdatePause
  297. --  Global gPause
  298. --  if the castNum of sprite 48 then
  299. --    set the movieRate of sprite 48 to not gPause
  300. --  end if
  301. --end
  302. --
  303. ----------------------------------------------------------------
  304. --on UpVol
  305. --  put the soundlevel into SL
  306. --  put SL + 1 into SL
  307. --  set the soundLevel to SL
  308. --  UpdateVolume
  309. --end
  310. ----------------------------------------------------------------
  311. --on DownVol
  312. --  put the soundlevel into SL
  313. --  put SL - 1 into SL
  314. --  set the soundLevel to SL
  315. --  UpdateVolume
  316. --end
  317. --
  318. ----------------------------------------------------------------
  319. --on HandleKeys
  320. --  Global gMPointer
  321. --  if the Key = " " then
  322. --    if the movierate of sprite 48 then
  323. --      if not ListP(gMPointer) then put [] into gMPointer
  324. --      add(gMPointer, the movieTime of sprite 48)
  325. --      put gMPointer
  326. --    end if
  327. --  end if
  328. --end HandleKeys
  329. ----------------------------------------------------------------
  330. --on clearSprites
  331. --  repeat with i = 1 to 48
  332. --    if (i <> the clickOn) then puppetsprite i, false
  333. --  end repeat
  334. --end
  335. ----------------------------------------------------------------
  336. --on goto where
  337. --  --put "go:"&where
  338. --  go where
  339. --end 
  340. --
  341.