Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Print Current Marker
AdjustColors
CatEffects pack
File open/save dialog
[S] mouse->sprite vector behaviour
Macromedia Director 7 - Illustrated Complete
Flash sending messages to Director
SpellChecker
Spawn
Tracking save attempts
 

 

 

Behavior QTVR basic behavior

Added on 5/24/2001

 

Compatibilities:
behavior D8

This item has not yet been rated

Author: robbchar

This is a behavior from when I was playing around with QTVR. The one I ended up using was more complicated but also fine tuned for what I was doing. This is the basic script for what I did.

-- Author Robb Charnock
-- robbc99@hotmail.com
-- May 24, 2001
property props
-- props gotten from getPropertyDescriptionList
-- I like to keep my props in a property list for . access
-- you can't do this and use getPropertyDescriptionList unless you hack it like this
property swingSpeed

on beginSprite me
  props = [:]
  props.addProp(#sprite, sprite(me.spriteNum))
  props.addProp(#newVRFName, "")
  props.addProp(#state, #viewingVR)
  props.addProp(#transitionFName, "")
  props.addProp(#swingDegree, 0)
  props.addProp(#swingSpeed, swingSpeed)
  props.addProp(#transitionSprite, sprite(me.spriteNum + 1))
  
  props.transitionSprite.loc = point(-2000, -2000)
end
-- this just gets the basic stuff from the QTVR movie
-- anything else pretty much has to be hard coded
on mouseUp me
  -- get the basics from the movie
  spotId = props.sprite.ptToHotSpotID(point(the mouseH, the mouseV))
  currentPan = props.sprite.pan
  currentNode = props.sprite.node
  
  -- get the movie's name
  theFName = props.sprite.member.fileName
  theFName = theFName.item[theFName.items.count] -- get the actual file's name
  theFName = theFName.char[1..theFName.char.count - 4] -- strip off the '.mov'
end

on getPropertyDescriptionList me
  description = [:]
  description.addProp(#swingSpeed, [#default:1, #format:#integer, #range:[#min:1, #max:10], #comment:"The speed the movie will swing."])
  return description
end

on getBehaviorDescription
  return "This is a behavior from when I was playing around with QTVR. The one I ended up using was more complicated but also fine tuned for what I was doing. This is the basic script for what I did." & RETURN & "Other props or handlers of interest:" & RETURN & "pan of sprite whichQTVRSprite" & RETURN & "WhichQTVRSprite.swing(pan, tilt, fieldOfView, speedToSwing)" & RETURN & "tilt of sprite (whichQTVRSprite)"
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail