[X3D-Public] Has anyone gotten Contact working in Firefox/Chrome?

dave at realmofconcepts.com dave at realmofconcepts.com
Wed Jun 29 15:25:43 PDT 2011


Hi all.

I'm having trouble getting anything like SAI or EAI or whatever working
with Contact 7.2 and anything but IE.

I can't set any value to any field on any node. I can't even getWorld on
it. I can getVersion ok, and a few other API's, so I know it's not brain
dead per-se. The scene loads ok via the SRC param to the 'embed', but I
can't get anything into or out of the scene.

And, how do you set up a 'listener'? I have this odd thing working in IE
but it doesn't work the same way in FF or Chrome. Is it a DOM thing of
some sort to set up?

Any working examples would get you my eternal gratitude and beverage of
your choice when next we meet.

Dave A.

PS: the code:

<HTML>
<HEAD>
<TITLE>Not IE</TITLE>
<script>

        function SetSomething()
        {
                var n = document.Contact.getWorld();
                alert (n); // always null
                alert (document.Contact.getVersion()); // this is ok!
                document.Contact.setNodeEventIn ('MyText', 'string',
'test'); // fail
        }
</script>
</HEAD>
<body>
<BODY>
  <embed
id = 'Contact' name='Contact'
   width="96%%" height="96%%"
   SRC="SimpleScene.x3dv"
   DASHBOARD="TRUE"
   PrimitiveQuality="HIGH"
   antialias="TRUE"
   MaxTextureSize="0"
   LoadScreen="TRUE"
   RightMouseMenu="FULL"
  >
<input type='button' onClick='SetSomething()' value='set'/>
</center>
</BODY>
</HTML>





More information about the X3D-Public mailing list