View Full Version : Hyperlink out of Vizard?
tacbob
02-23-2007, 01:48 AM
Can you hyperlink out of Vizard by clicking an object and have the browser open in a new window?
Thanks
farshizzo
02-23-2007, 10:05 AM
Sure, here is a sample script:import webbrowser
import viz
viz.go()
viz.mouse(viz.OFF)
ball = viz.add('ball.wrl')
ball.translate(0,1.8,3)
def PickObject():
obj = viz.pick()
if obj == ball:
webbrowser.open('http://www.worldviz.com')
vizact.onmousedown(viz.MOUSEBUTTON_LEFT,PickObject )
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.