Working with QTVR

The following description is based on Explore the Moment exploration on the Multimedia disk for FACS 3930s Assignment #3.


How it all Works

Handlers

There are 5 events that can be handled within a QTVR movie: This section will not discuss the last two.

Handler Setup

When the handlers are set up, they refer to sprites. Therefore, the setup must be done as a frame script when the QTVR is in the score.
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 initVR
In 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


Step by Step (thanks to Nadine)

This example uses the new.dir movie in the qtvr - simple new ex folder on the Multimedia disk

Basic Setup Steps

Get your QTVR movie (will probably be named _____.scene because it will have hotspots) into your Director movie like so:

  1. put your QTVR ___.scene movie into the same folder as your Director movie
  2. INSERT>MEDIA ELEMENT>QUICKTIME 3
  3. a window opens
  4. click on the blue circle with the white i in it (get info button)
  5. another window will open
  6. click on the options button
  7. a large window will open
  8. click on the browse button
  9. choose the _____.scene movie that you want to import
  10. click on OPEN to import the ___.scene movie
  11. you will be back in the large window - look at the field at the very top
  12. erase all text in that field before the name of your ______.scene movie - you should end up with only the name of your ______.scene movie left in the field
  13. click on OK
  14. in the next window, click on OK
  15. close the window that you find yourself in
  16. your ____.scene movie should be in your cast
Put your QTVR movie into your score, preferably into channel 1 (if you put it in another channel, you have to make some minor scripting adjustments later on).

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:

  1. open your own movie in Director
  2. go to WINDOW>SCRIPT to open a scripting window, and then choose EDIT>PASTE to paste the script
  3. look at the window's title bar, and note the number showing up there
  4. this number tells you which cast member the script is (cast member number 7, for instance)
  5. go to your cast window, and click once on that cast member to select it
  6. click on the blue circle with the i in it to get info on that cast member
  7. in the window that comes up, choose TYPE: Movie, and click OK.
In the very last frame of your QTVR sprite span, put a marker named appropriately (like QTVRend).

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.

york logo

I am in the process of overhauling this section. Many pages are outdated. - don
Introduction
Tips
Lingo
Behaviours
Multiple movies/casts
Projectors
Lingo Examples
Shockwave
Using Quicktime
Using QTVR
Resources