home *** CD-ROM | disk | FTP | other *** search
/ Venus' Playhouse / Venus_Playhouse.iso / mac / PCPLHAUS.DXR / 00112_Script_112 < prev    next >
Text File  |  1998-03-29  |  10KB  |  473 lines

  1. global qtSprite, qtSpeed, qtVol
  2. global Destin
  3. global haveBeen
  4. global questLine, yesIn, yesOut, noIn, noOut, questOut, whereNext
  5.  
  6.  
  7. --The MAIN MOVIE Script
  8. on StartMovie
  9.   clearGlobals 
  10.   global qtSprite -----,increment, L
  11.   set qtSprite = 11
  12.   set the immediate of sprite 8 to TRUE
  13.   --puppetSprite 4, TRUE
  14.   set the constraint of sprite 18 to 19
  15. end StartMovie
  16.  
  17. on stopMovie
  18.   clearGlobals
  19. end stopMovie
  20.  
  21.  
  22.  
  23. ---
  24. ---QT parameter set scripts
  25.  
  26.  
  27. on setPoints inTime, outTime
  28.   set the startTime of sprite qtSprite to value(inTime)
  29.   set the stopTime of sprite qtSprite to value(outTime)
  30.   set the movieTime of sprite qtSprite to value(inTime)
  31.   updateStage
  32. end setPoints
  33.  
  34. on playSeg inTime,outTime
  35.   set the startTime of sprite qtSprite to value(inTime)
  36.   set the stopTime of sprite qtSprite to value(outTime)
  37.   set the movieTime of sprite qtSprite to value(inTime)
  38.   set qtVol = 255
  39.   set qtSpeed = 1
  40.   playSome
  41. end playSeg
  42.  
  43. on playSegment inTime, outTime
  44.   set the movieTime of sprite qtSprite to value(inTime)
  45.   repeat while the movieTime of sprite qtSprite < value(outTime)
  46.     go to the frame
  47.     updateStage
  48.   end repeat
  49. end playSegment
  50.  
  51.  
  52. on ranger
  53.   set the movieRate of sprite qtSprite = value(qtSpeed)
  54.   set qtVol = 255
  55.   go to the frame
  56. end ranger
  57.  
  58. on playSome
  59.   set the movieRate of sprite qtSprite to value(qtSpeed)
  60.   set the volume of sprite qtSprite to value(qtVol)
  61. end playSome
  62.  
  63.  
  64.  
  65. ---
  66. ---Navigational scripts
  67.  
  68. on goWhere
  69.   go Destin
  70. end gowhere
  71.  
  72. on kitchenIt
  73.   set haveBeen = haveBeen + 1
  74.   aniRoom 10
  75.   puppetSound 0
  76.   Go to "Kitchen"
  77. end kitchenIt
  78.  
  79. on dineIt
  80.   updateStage
  81.   aniRoom 9
  82.   puppetSound 0
  83.   Go to "Dine"
  84. end dineIt
  85.  
  86. on poolIt
  87.   set haveBeen = haveBeen + 1
  88.   aniRoom 10
  89.   puppetSound 0
  90.   Go to "Pool"
  91. end poolIt
  92.  
  93. on bathIt
  94.   set haveBeen = haveBeen + 1
  95.   aniRoom 9
  96.   puppetSound 0
  97.   Go to "Bath"
  98. end bathIt
  99.  
  100. on showerIt
  101.   set haveBeen = haveBeen + 1
  102.   aniRoom 10
  103.   puppetSound 0
  104.   Go to "Shwr"
  105. end showerIt
  106.  
  107. on bedIt
  108.   global haveBeen
  109.   set haveBeen = haveBeen + 1
  110.   aniRoom 8
  111.   puppetSound 0
  112.   Go to "Bed"
  113. end bedIt
  114.  
  115.  
  116. ---
  117. ---Prepatory scripts
  118.  
  119.  
  120. on setUp
  121.   repeat with i = 8 to 10
  122.     puppetSprite i, TRUE
  123.     set the visibility of sprite i to FALSE
  124.     updateStage
  125.   end repeat
  126. end setUp
  127.  
  128. on aniRoom spRt
  129.   anIt
  130.   puppetSound "Clicker4"
  131.   set the visibility of sprite spRt to TRUE
  132.   updateStage
  133.   unanIt
  134.   set the visibility of sprite spRt to FALSE
  135.   updateStage
  136. end aniRoom
  137.  
  138. on playIntro
  139.   set haveBeen = 0
  140.   set the startTime of sprite qtSprite to 6
  141.   set the stopTime of sprite qtSprite to 1314
  142.   set the movieTime of sprite qtSprite to 6
  143.   set the volume of sprite qtSprite to 255
  144.   set the movieRate of sprite qtSprite to 1
  145. end
  146.  
  147. on intro inTime,outTime
  148.   set the startTime of sprite qtSprite to value(inTime)
  149.   set the stopTime of sprite qtSprite to value(outTime)
  150.   set the movieTime of sprite qtSprite to value(inTime)
  151.   set the volume of sprite qtSprite to 255
  152.   set the movieRate of sprite qtSprite to 1
  153. end intro
  154.  
  155.  
  156. ---on poolIntro
  157. ---global PyesIn, PyesOut, PnoIn, PnoOut
  158. --- set PyesIn = 1731
  159. ---set PyesOut = 4464
  160. ---set PnoIn = 11692
  161. ---set PnoOut = 12080
  162. ---playSegmentQT 1000, 1565
  163. ---nd poolIntro
  164.  
  165. ---on poolPlayYes
  166. ---global PyesIn, PyesOut
  167. ---playSegmentQT PyesIn, PyesOut
  168. ---pause
  169. ---end poolPlayYes
  170.  
  171. ---on poolPlayNo
  172. ---global PnoIn, PnoOut
  173. ---playSegmentQT PnoIn, PnoOut
  174. ---pause
  175. ---end poolPlayNo
  176.  
  177. ---
  178. ---Animation Scripts
  179.  
  180.  
  181. on anIt
  182.   put the castNum of sprite the clickOn into Butt
  183.   set newButt = Butt + 1
  184.   set the castNum of sprite the clickOn to newButt
  185.   updateStage
  186.   set newButt = newButt + 1
  187.   set the castNum of sprite the clickOn to newButt
  188.   updateStage
  189. end anIt
  190.  
  191. on unanIt
  192.   put the castNum of sprite the clickOn into Butt
  193.   set newButt = Butt - 1
  194.   set the castNum of sprite the clickOn to newButt
  195.   updateStage
  196.   set newButt = newButt - 1
  197.   set the castNum of sprite the clickOn to newButt
  198.   updateStage
  199. end unanIt
  200.  
  201.  
  202. on aniMate
  203.   anIt
  204.   puppetSound "Clicker4"
  205.   updateStage
  206.   unanIt
  207.   updateStage
  208. end aniMate
  209.  
  210.  
  211.  
  212.  
  213. ---
  214. ---Interactivity Choice Scripts
  215.  
  216. on pickVenus
  217.   aniMate
  218.   puppetSound 0
  219.   go to "Venus"
  220. end pickVenus
  221.  
  222. on pickJulia
  223.   aniMate
  224.   puppetSound 0
  225.   go to "Julia"
  226. end pickJulia
  227.  
  228. on pickBoth
  229.   aniMate
  230.   puppetSound 0
  231.   Go to "Bathboth"
  232. end pickBoth
  233.  
  234.  
  235. on pickLeigh
  236.   aniMate
  237.   puppetSound 0
  238.   Go to "Leigh"
  239. end pickLeigh
  240.  
  241. on pickVanna
  242.   aniMate
  243.   puppetSound 0
  244.   Go to "Vanna"
  245. end pickVanna
  246.  
  247. on pickShwrbth
  248.   aniMate
  249.   puppetSound 0
  250.   Go to "Shwrbth"
  251. end pickShwrbth
  252.  
  253.  
  254.  
  255. --QuickTime Controls
  256. --These controls the FF, SloF, Stop/Play, SloRew and Rewind
  257. --of QuickTime movies
  258.  
  259.  
  260. ----  DO NOT TAMPER!!!   These work fine!!!
  261.  
  262.  
  263. on rewindQT
  264.   put the movieTime of sprite qtSprite into Now
  265.   set the movieTime of sprite qtSprite = Value(Now) -18
  266.   updateStage
  267.   if the movieRate of sprite qtSprite <> -3 then
  268.     set qtVol = 0
  269.     set qtSpeed = -(3)
  270.     playSome
  271.   else
  272.     set qtSpeed = 0
  273.     playSome
  274.   end if
  275. end rewindQT
  276.  
  277. on sloRevQT
  278.   set the movieRate of sprite qtSprite =0
  279.   put the movieTime of sprite qtSprite into X
  280.   set X=X-6
  281.   set the movieTime of sprite qtSprite to X
  282.   updateStage
  283. end sloRevQT
  284.  
  285. on stopstartQT
  286.   if the movieRate of sprite qtSprite = 0 then
  287.     set the volume of sprite qtSprite to 255
  288.     set the movieRate of sprite qtSprite to 1
  289.   else
  290.     set qtSpeed = 0
  291.     playSome
  292.   end if
  293. end stopstartQT
  294.  
  295. on pauseQT
  296.   set qtSpeed = 0
  297.   playSome
  298. end pauseQT
  299.  
  300. on sloFwdQT
  301.   set the movieRate of sprite qtSprite =0
  302.   put the movieTime of sprite qtSprite into X
  303.   set X=X+6
  304.   set the movieTime of sprite qtSprite to X
  305.   updateStage
  306. end sloFwdQT
  307.  
  308. on fastForwardQT
  309.   if the movieRate of sprite qtSprite <> 4 then
  310.     set qtVol = 0
  311.     set qtSpeed = 4
  312.     playSome
  313.   else
  314.     set qtSpeed = 0
  315.     playSome
  316.   end if
  317. end fastForwardQT
  318.  
  319. ----This is the end
  320. ----of the QuickTime control section
  321.  
  322.  
  323.  
  324. ---Pool handlers
  325. on askPool
  326.   put line value(questLine) of the text of cast "PQin" into questIn
  327.   put line value(questLine) of the text of cast "PQout" into questOut
  328.   put line value(questLine) of the text of cast "PQYin" into yesIn
  329.   put line value(questLine) of the text of cast "PQYout" into yesOut
  330.   put line value(questLine) of the text of cast "PQNin" into noIn
  331.   put line value(questLine) of the text of cast "PQNout" into noOut
  332.   set the startTime of sprite qtSprite to value(questIn)
  333.   set the stopTime of sprite qtSprite to value(questOut)
  334.   set the movieTime of sprite qtSprite to value(questIn)
  335.   updateStage
  336.   set the volume of sprite qtSprite to 255
  337.   set the movieRate of sprite qtSprite to 1
  338. end askPool
  339.  
  340. on Yup
  341.   intro value(yesIn), value(yesOut)
  342.   put line value(questLine) of field "NextPQ" into X
  343.   put line value(questLine) of field "poolYcom" into whereNext
  344.   put chars(X, 1, 2) into Y
  345.   set questLine = value(Y)
  346. end Yup
  347.  
  348. on Nop
  349.   global questLine, noIn, noOut, whereNext
  350.   intro value(noIn), value(noOut)
  351.   put line value(questLine) of field "NextPQ" into X
  352.   put line value(questLine) of field "poolNcom" into whereNext
  353.   put chars(X, 3, 4) into Y
  354.   --put Y into cast D52
  355.   updateStage
  356.   set questLine = value(Y)
  357. end Nop
  358.  
  359. on poolYes
  360.   unanIt
  361.   updateStage
  362.   go to "Pooly"
  363. end poolYes
  364.  
  365. on poolNo
  366.   unanIt
  367.   updateStage
  368.   go to "Pooln"
  369. end poolNo
  370.  
  371. ----Bedroom handlers
  372. on askBed
  373.   global qtSprite, questLine, yesIn, yesOut, noIn, noOut, questOut
  374.   put line value(questLine) of field "Question In" into questIn
  375.   put line value(questLine) of field "Question Out" into questOut
  376.   --put value(questIn) into cast D27
  377.   --put value(questOut) into cast D28
  378.   --updateStage
  379.   put line value(questLine) of field "AnsYin" into yesIn
  380.   put line value(questLine) of field "AnsYout" into yesOut
  381.   put line value(questLine) of field "AnsNin" into noIn
  382.   put line value(questLine) of field "AnsNout" into noOut
  383.   set the startTime of sprite qtSprite to value(questIn)
  384.   set the movieTime of sprite qtSprite to value(questIn)
  385.   set the stopTime of sprite qtSprite to value(questOut)  
  386.   updateStage
  387.   if the movieTime of sprite qtSprite = value(questIn) then
  388.     updateStage
  389.     set the volume of sprite qtSprite to 255
  390.     set the movieRate of sprite qtSprite to 1
  391.   else
  392.     updateStage
  393.   end if
  394. end askBed
  395.  
  396. on ansYbed
  397.   global questLine, yesIn, yesOut, whereNext
  398.   intro value(yesIn), value(yesOut)
  399.   --put value(yesIn) into cast D23
  400.   --put value(yesOut) into cast D24
  401.   updateStage
  402.   put line value(questLine) of field "NextYN" into X
  403.   put line value(questLine) of field "nextYcom" into whereNext
  404.   put chars(X, 1, 2) into Y
  405.   set questLine = value(Y)
  406. end ansYbed
  407.  
  408. on ansNbed
  409.   global questLine, noIn, noOut, whereNext
  410.   intro value(noIn), value(noOut)
  411.   put line value(questLine) of field "NextYN" into X
  412.   put line value(questLine) of field "nextNcom" into whereNext
  413.   put chars(X, 3, 4) into Y
  414.   --put Y into cast D28
  415.   --updateStage
  416.   set questLine = value(Y)
  417. end ansNbed
  418.  
  419.  
  420. on bedYes
  421.   anIt
  422.   puppetSound "Clicker4"
  423.   updateStage
  424.   unanIt
  425.   updateStage
  426.   puppetSound 0
  427.   go to "Bedy"
  428. end bedYes
  429.  
  430. on bedNo
  431.   anIt
  432.   puppetSound "Clicker4"
  433.   updateStage
  434.   unanIt
  435.   updateStage
  436.   puppetSound 0
  437.   go to "Bedn"
  438. end bedNo
  439.  
  440.  
  441. on repLoop
  442.   if the movieTime of sprite 11 < questOut then
  443.     go to the frame
  444.   else
  445.     set the movieTime of sprite 11 to value(questOut)
  446.     set the movieRate of sprite 11 to 0
  447.     go to the frame
  448.   end if
  449. end repLoop
  450.  
  451.  
  452. on repYes
  453.   global yesOut, whereNext
  454.   if the movieTime of sprite 11 < value(yesOut)-24 then
  455.     --if the movieTime of sprite 11 < the stopTime of sprite 11 then
  456.     go to the frame
  457.   else
  458.     Do whereNext
  459.   end if
  460. end repYes
  461.  
  462. on repNo
  463.   global noOut, whereNext
  464.   if the movieTime of sprite 11 < value(noOut)-24 then
  465.     go to the frame
  466.   else
  467.     Do whereNext
  468.   end if
  469. end repNo
  470.  
  471.  
  472.  
  473.