function onConstructed()
{
var myObject = new Object;
scene.addDOMObject("foo", myObject);
}
function onUsingObject()
{
var myObject = scene.foo;
if (myObject)
{
// Do something.
}
}
function onClose()
{
scene.removeDOMObject("foo");
}