<?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
      
                     <![CDATA[
                  
                  
      
ecmascript:
function whichBackground (inputValue)
{
    if (currentBackground == inputValue)
        return; // avoid rapid Background binding (probably overcautious)
    currentBackground = inputValue; // remember state
    Browser.println ("currentBackground=" + currentBackground);
    if      (inputValue == 0) bind0 = true; // send event
    else if (inputValue == 1) bind1 = true; // send event
    else if (inputValue == 2) bind2 = true; // send event
    else if (inputValue == 3) bind3 = true; // send event
}
    
                  
                     ]]>
                  
         <!--
Color key: 
<X3dNode
          DEF='idName' field='value'/> 
 matches 
<XmlElement
          DEF='idName' attribute='value'/> 
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
          -->
      
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->