ParallelGraphics Forums
General
You are here:
[Forums]
::
[General]
All forums
How to use forums
Favorites
Services
Registration
Registration
Forgot your password?
Help
Help
Support
Quick search
Subscribe to newsletters
email:
password:
General
[reply]
[back to forum]
[new message]
[all forums]
Subject:
Dynamically change script node's url field
Sender:
dan.vera@gmail.com
12.03.08 03:01
Hello,
I am trying to dynamically change the the "url" exposefield of a VRML script node, but it does not work. Could anyone tell me if this a limitation of VRML, or if it is a bug of the cortona browser. Many thanks
Here is the code that does not work; I narrowed the problem down to its simplest form:
The script node of which i want to dynamically set the url looks like this:
----------------------------------------------
DEF my_script Script {
eventIn SFFloat my_float
}
----------------------------------------------
A file called test_js.js located in c: contains the following code:
----------------------------------------------
javascript:
function my_float (val) {
print(val);
}
----------------------------------------------
The code i use to test the whole things defines two spheres with touch_sensors that are routed to the following script:
---------------------------------------------
DEF script Script {
field SFNode my_script USE my_script
eventIn SFTime event1
eventIn SFTime event2
directOutput TRUE
url "javascript:
function event1 (){
my_script.url = new MFString('C:/test_js.js') ;
}
function event2 (){
my_script.my_float = 10;
}
"}
-------------------------------------------------
[reply]
[back to forum]
[new message]
[all forums]
Dynamically change script node's url field
/
dan.vera@gmail.com
/ 12.03.08 03:01
Re: Dynamically change script node's url field
/ Uh / 13.03.08 23:03
Re: Dynamically change script node's url field
/
dan.vera@gmail.com
/ 14.03.08 00:15
Messages in thread:
3
[reply]
[back to forum]
[new message]
[all forums]
© 1998-2007
ParallelGraphics
. All rights reserved.
Terms of use
.