Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Browser.loadURL / Applet.showDo***ent bug
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 23rd April 10:17
muaddib
External User
 
Posts: 1
Default Browser.loadURL / Applet.showDo***ent bug



Greetings again,

I am having difficulties with loadURL and showDo***ent methods
using Java EAI. Unfortunately, the scenario is too complicated to
produce example source files, but this is the situation. I have
essentially a Collision detector which, when activated, invokes one of
the above two methods to load a new world. Typically a user is moving
through the collision area when it is activated, which means that as the
new world is loading, they are still holding down the mouse button. At
least in Blaxxun 5.1, when the new world loads up, the browser has "a
problem". It hasn't frozen, instead, the browser ignores all input
from the mouse. The problem is fixed by clicking on another window, and
then moving the mouse back to the browser.

Has anyone seen this error in other browsers? Knows a good
workaround? I have created a way to wait for the user to depress the
mouse button before loading the next world, but would like something better.

Muaddib


--
-------------------------------------------------------
VRSpace - An open source, 3D, modular, cross-platform,
multi-user system with persistent shared objects.
Check out a demo at http://www.vrspace.org/demo.htm
-------------------------------------------------------
  Reply With Quote


  sponsored links


2 23rd April 10:18
wtangel
External User
 
Posts: 1
Default Browser.loadURL / Applet.showDo***ent bug



Hi:

The following code shows how to use a ProximitySensor to detect when
the viewer has "collided" with an object (a Box). Upon detecting the
collision, the Script code adds an alternative world to the scene, and
then switches to displaying that world. Perhaps this approach will
work better than the one that you are currently attempting to utilize.

#VRML V2.0 utf8

Collision {
collide FALSE
children
DEF SWITCH Switch {
choice [
DEF LEVEL0-GROUP Group {
children [
DEF PROXIMITY-SENSOR-LOD-LEVEL0 ProximitySensor {
center 0 0 0
size 10 10 10
}
Box { size 10 10 10 }
]
}
DEF LEVEL1-GROUP Group {}
]

}
}

DEF SCRIPT Script {
field SFNode lodLevel1Group USE LEVEL1-GROUP
field SFString level1URL "sphere.wrl"
field SFNode mySwitch USE SWITCH
eventIn SFBool proximitySensor_isActive
eventIn MFNode nodesAdded
directOutput TRUE
url [
"javascript:
function initialize () {
mySwitch.set_whichChoice = 0;
}
function proximitySensor_isActive(value) {
if(value == true) {
Browser.createVrmlFromURL(level1URL,lodLevel1Group ,'addChildren');
print('nodes created'); // for debugging
}
}
function nodesAdded(value) {
if(value.length > 0) {
mySwitch.set_whichChoice = 1;
print('nodes added to scene'); // for debugging
}
}
"
]
}

ROUTE PROXIMITY-SENSOR-LOD-LEVEL0.isActive TO
SCRIPT.proximitySensor_isActive
ROUTE LEVEL1-GROUP.children_changed TO SCRIPT.nodesAdded


<end of code>

In this example, the file "sphere.wrl" contains the following
statements

#VRML V2.0 utf8
Sphere { radius 1 }


--- Bill Angel
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666