Programming the 3Space player object with JavaScript

Once you've create a 3Space player, you can access its methods and properties from JavaScript. Although you could use VBScript, we only use JavaScript with 3Space for portability reasons. Furthermore, the 3Space event handlers must be written in JavaSrcipt exclusively.

Here we will dynamically change the XMLID tag to display a new scene when clicking on an hyperlink. The HTML tag looks like:

<a href="javascript:void(0)" onClick="MyPlayer.XMLID='newId'"> Change Scene</a>

MyPlayer is the ID of the 3Space player object included in the page.

See the samples for advanced techniques to program the 3Space player.