Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using the option PAN

Using the option PAN

Using the option PAN


I'm verry stuck with the following problem:
I have a QTVR movie an several hotspots. Once clicked on that hotspot, it swings to the center of the view.
The option SWING will not wait until it is finished before continuing to the next assignment. In every help I found, it was discribed that it could be checked with the PAN option. But I can't seem to find a way to call it in the right form.

I've used several options, but it wouln't work:
pan (p_currentSprite)
pan Sprite(p_currentSprite)
and so on.
Can anyone give me an example or the right syntax to use this option??

PoGo :)

RE: Using the option PAN

I've managed to fix the loop and adressing de pan option, but it just woun't stop!
It's beginning to get irritating :)

Explained things:

p_currentSprite = the VR movie
varpan = a variable for the pan degrees
pan = the degrees (0 - 360) in an QTVR movie where the user van look at.

The Source:

   repeat while the pan of Sprite(p_currentSprite) <> varpan then
      swing(sprite p_currentSprite,varpan,0,33,5)      
      varpan = the pan of Sprite(p_currentSprite)
      alert "Pan of sprite during loop...  " & the pan of Sprite(p_currentSprite)
    end repeat
    alert "this messsage should appear after loop"

*** end source

The problem is that the last message is being shown while the swing option is active. And that's not the intention....

How to deal with this stupid problem... :)

Thanks ahead,

RE: Using the option PAN

ok, got it.

when you set varpan = the pan of Sprite(p_currentSprite) you instantly make the repeat condition true hence the repeat is exited and the alert shown.  

try commenting out the varpan = line, now it should just keep on spinning till it gets to what you set varpan too in the first place.  

try something like this

swing(sprite p_currentSprite, varpan,0,33,5)
-- i am thinking the swing command will smoothly turn it over time
repeat while the pan of Sprite(p_currentSprite) <> varpan
  alert "alert message"
-- i would use put or your going to get lots of alerts
-- you may need an updatestage in here too, but probably not
end repeat
alert "new alert message"

this code (if my ideas of swing are correct) will start the rotation and then keep putting the message up till the pan reaches varpan, at that time it will break out and show the new alert.

RE: Using the option PAN

Thanks. I'll try that. :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close