WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Hyperlink out of Vizard? (https://forum.worldviz.com/showthread.php?t=1007)

tacbob 02-23-2007 01:48 AM

Hyperlink out of Vizard?
 
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:
Code:

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)



All times are GMT -7. The time now is 07:13 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC