on prepareFrame initVR set the visible of sprite 1 to true end on initVR -- set up which routines handle which events -- the routines to handle mouseenter and mouseleave hot spots set the VRHotSpotEnterCallback of sprite 1 to #handleHSENTER set the VRHotSpotExitCallback of sprite 1 to #handleHSEXIT -- the routines to enter entering and exiting nodes set the VRNodeExitCallback of sprite 1 to #handleEXIT set the VRNodeEnterCallback of sprite 1 to #handleENTER -- the routine to handle clicking on a hotspot set the VRTriggerCallback of sprite 1 to #handleTRIGGER end initVRIn each handler, you must test to see which node has been clicked on...
on handleHSENTER who, id global node2counter -- handle the mouse entering a hot spot put "YUP mouseenter" put who & " " id -- decide which hot spot the mouse is over if id = 66 then else if id = 59 then else if id = 2 then if node2counter < 250 then set node2counter = node2counter+50 else end if set the volume of sound 8 to node2counter puppetSound 8, "hey" end if showparams return #continue end
Mark off the first frame of the QTVR sprite with a marker named appropriately.
About 1/4 of the way through your QTVR sprite span, put a marker named q or something.
About 1/2 of the way through your QTVR sprite span, put a script in the scripting channel that sends the Director movie back to the q marker.
Go to the "new.dir" movie and open the cast. Look for the Mouse Level behavior, click on it once, and go to EDIT>COPY. Then go into your own Director 7 movie and click once on an empty cast member window, and go to EDIT>PASTE. This new cast member needs to be dragged on to any QTVR sprites that you have in the score of your movie. Settings for the Mouse Level behavior should be:
Go to the "new.dir" movie and open the score. Copy the script in scripting channel that's one frame or so in from the very start of the QTVR sprite - do this by clicking once on the script and choosing EDIT>COPY. Place it similarly in your movie by opening your movie, clicking once in a frame in your scripting channel that's one frame or so in from the very start of your QTVR sprite, and choosing EDIT>PASTE.
If you did not put your QTVR movie into channel 1, you will have to go into this script in your Director movie and switch everything that talks about sprite 1 to reflect the channel you've put your QTVR sprite in (if it is in channel 5, then change the script to always refer to sprite 5).
Copy the Movie script from the new.dir movie - go to WINDOW>SCRIPT to make a window come up. At the top left, there will be a bar with a downward pointing arrow (bar may say something in it), hold down on the bar and choose handleHSenter. Then select all the text in the window, copy it, and paste it in your movie like so:
Go to the new.dir movie and open the score. Copy the script in the scripting channel that is one frame after the end of the QTVR sprite (and the marker there) - do this by clicking once on the script and choosing EDIT>COPY. Place it similarly in your movie by opening your movie, clicking once in the frame in your scripting channel that is one frame after the end of the QTVR sprite, and choosing EDIT>PASTE.
Valid for Fall/Winter 2003-2004
The material contained in this site is copyright and owned exclusively by Don Sinclair and members of the FACS teaching team.
Last modified on 14-Nov-03 at 9:28 AM.