Thread: waittime
View Single Post
  #2  
Old 04-29-2005, 02:34 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Cade,

Can you try the following code. I tried it here and it works fine. Also, make sure that you aren't changing the visiblity of the objects somewhere else in your code. Just press the spacebar. The label should disappear and a quad should show up 2 seconds later.
Code:
import viz
viz.go()

label = viz.add(viz.TEXT3D,'Label',viz.SCREEN)
label.translate(0.5,0.5)
label.alignment(viz.TEXT_CENTER_CENTER)

quad = viz.add(viz.TEXQUAD,viz.SCREEN)
quad.translate(0.5,0.2)
quad.visible(viz.OFF)

def viewPic():
	label.visible(viz.OFF)
	viz.waittime(2)
	#quad.texture(pics[0])
	quad.visible(viz.ON)

def onkeydown(key):
	if key == ' ':
		viz.director(viewPic)

viz.callback(viz.KEYDOWN_EVENT,onkeydown)
Reply With Quote