{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.0",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"DvdControllerPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"Digital Virtual Display (DVD) Controller Prototype definition to control animation timing. Heads-up display keeps DVD Controller on screen."
          },
          {
            "@name":"creator",
            "@content":"Jane Wu, Don Brutzman, Jonathan Roberts"
          },
          {
            "@name":"created",
            "@content":"19 July 2001"
          },
          {
            "@name":"modified",
            "@content":"5 March 2024"
          },
          {
            "@name":"subject",
            "@content":"DvdController animation control"
          },
          {
            "@name":"TODO",
            "@content":"check handling of beginning/end buttos"
          },
          {
            "@name":"TODO",
            "@content":"X3D-Edit ExternProtoDeclare panel autocheck missed notifying that some fields are not in original ProtoDeclare"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerPrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"26 March 2026"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"DvdControllerPrototype.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"SliderFloat",
              "@appinfo":"Slider user-interface widget that produces floating-point output values",
              "@url":["../../../Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat","../../../Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat"],
              "-children":[
                {
                  "#comment":"TODO autocheck missed that these are not in original ProtoDeclare... do these go into DvdController interface? <field accessType='outputOnly' name='isDragged' type='SFBool'/> <field accessType='initializeOnly' appinfo='default value true' name='dragEnabled' type='SFBool'/> <field accessType='inputOnly' name='setDragEnabled' type='SFBool'/> <field accessType='outputOnly' name='dragEnabledChanged' type='SFBool'/> <field accessType='initializeOnly' appinfo='default value true' name='clickEnabled' type='SFBool'/> <field accessType='inputOnly' name='setClickEnabled' type='SFBool'/> <field accessType='outputOnly' name='clickEnabledChanged' type='SFBool'/>"
                }
              ],
              "field": [
                {
                  "@name":"layoutDirection",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Allowed values: vertical, horizontal",
                  "@type":"SFString"
                },
                {
                  "@name":"height",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 1.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"radius",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.1",
                  "@type":"SFFloat"
                },
                {
                  "@name":"barRadius",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.02",
                  "@type":"SFFloat"
                },
                {
                  "@name":"sliderBarColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .8 .4 .8",
                  "@type":"SFColor"
                },
                {
                  "@name":"sliderBallColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .3 .4 .8",
                  "@type":"SFColor"
                },
                {
                  "@name":"sliderEndColor",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value .2 .3 .9",
                  "@type":"SFColor"
                },
                {
                  "@name":"min",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"max",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 10.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"value",
                  "@accessType":"initializeOnly",
                  "@appinfo":"default value 0.0",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setMin",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setMax",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"setValue",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"valueChanged",
                  "@accessType":"outputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"traceEnabled",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Enable/disable console output for troubleshooting",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "ProtoDeclare":
            {
              "@name":"DvdController",
              "@appinfo":"Digital Virtual Display (DVD) Controller Prototype is a heads-up display (HUD) to control animation timing",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"testTimeVal",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value -2",
                      "@type":"SFTime",
                      "@value":-2
                    },
                    {
                      "@name":"description",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Short description of what is animated by this DvdController.",
                      "@type":"SFString"
                    },
                    {
                      "@name":"playEnabled",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Whether or not play mode is enabled including during startup.",
                      "@type":"SFBool",
                      "@value":false
                    },
                    {
                      "@name":"displayMode",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Initializes how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE.",
                      "@type":"SFString",
                      "@value":"PLAYBACK_SLIDER"
                    },
                    {
                      "@name":"setDisplayMode",
                      "@accessType":"inputOnly",
                      "@appinfo":"Sets how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE.",
                      "@type":"SFString"
                    },
                    {
                      "@name":"buttonColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Default button color.",
                      "@type":"SFColor",
                      "@value":[0.55,0.55,0.55]
                    },
                    {
                      "@name":"selectedButtonColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Button color when selected by user.",
                      "@type":"SFColor",
                      "@value":[0.75,0.75,0.75]
                    },
                    {
                      "@name":"labelColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Default label color.",
                      "@type":"SFColor",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"selectedLabelColor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Label color when selected by user.",
                      "@type":"SFColor",
                      "@value":[0.1,0.65,0.2]
                    },
                    {
                      "@name":"locationOffset",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Modified screen location and distance (for size).",
                      "@type":"SFVec3f",
                      "@value":[-2,-2,0]
                    },
                    {
                      "@name":"clockEnabled",
                      "@accessType":"initializeOnly",
                      "@appinfo":"default value true",
                      "@type":"SFBool",
                      "@value":true
                    },
                    {
                      "@name":"cycleInterval",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Time for complete loop cycle in seconds.",
                      "@type":"SFTime",
                      "@value":1.0
                    },
                    {
                      "@name":"set_cycleInterval",
                      "@accessType":"inputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"cycleInterval_changed",
                      "@accessType":"outputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"speedFactor",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Factor used to determine the speed increase/decrease for Fast Rewind and Fast Forward action.",
                      "@type":"SFFloat",
                      "@value":10
                    },
                    {
                      "@name":"isActive",
                      "@accessType":"outputOnly",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"startTime_changed",
                      "@accessType":"outputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"stopTime_changed",
                      "@accessType":"outputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"time_changed",
                      "@accessType":"outputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"fraction_changed",
                      "@accessType":"outputOnly",
                      "@type":"SFFloat"
                    },
                    {
                      "@name":"secondsElapsed",
                      "@accessType":"outputOnly",
                      "@type":"SFTime"
                    },
                    {
                      "@name":"isMaster",
                      "@accessType":"outputOnly",
                      "@appinfo":"isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"isRemote",
                      "@accessType":"outputOnly",
                      "@appinfo":"isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"isLocal",
                      "@accessType":"outputOnly",
                      "@appinfo":"isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"isPaused",
                      "@accessType":"outputOnly",
                      "@appinfo":"isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa.",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"isRunning",
                      "@accessType":"outputOnly",
                      "@appinfo":"isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa.",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"traceEnabled",
                      "@accessType":"initializeOnly",
                      "@appinfo":"Enable/disable console output for troubleshooting",
                      "@type":"SFBool",
                      "@value":false
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Transform":
                      {
                        "@DEF":"LocationOffset",
                        "IS": {
                            "connect": [
                              {
                                "@nodeField":"translation",
                                "@protoField":"locationOffset"
                              }
                            ]
                        },
                        "-children":[
                          { "ProximitySensor":
                            {
                              "@DEF":"WhereSensor",
                              "@size":[1000000000,1000000000,1000000000]
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"FixedLocation",
                              "-children":[
                                { "Transform":
                                  {
                                    "@DEF":"MovableLocation",
                                    "-children":[
                                      { "Transform":
                                        {
                                          "@translation":[0,0,-10],
                                          "-children":[
                                            { "Group":
                                              {
                                                "@DEF":"PlaneMovementSensorGroup",
                                                "-children":[
                                                  { "PlaneSensor":
                                                    {
                                                      "@DEF":"PlaneMovementSensor",
                                                      "@description":"select and drag to move interface"
                                                    }
                                                  },
                                                  { "VisibilitySensor":
                                                    {
                                                      "@DEF":"MovementVisibilitySensor"
                                                    }
                                                  },
                                                  { "Script":
                                                    {
                                                      "@DEF":"VisibilityControlScript",
                                                      "field": [
                                                        {
                                                          "@name":"description",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFString"
                                                        },
                                                        {
                                                          "@name":"traceEnabled",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFBool"
                                                        },
                                                        {
                                                          "@name":"isVisible",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFBool",
                                                          "@value":true
                                                        },
                                                        {
                                                          "@name":"locationOffset",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFVec3f"
                                                        },
                                                        {
                                                          "@name":"planeSensorTranslation",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFVec3f",
                                                          "@value":[0,0,0]
                                                        },
                                                        {
                                                          "@name":"setIsVisible",
                                                          "@accessType":"inputOnly",
                                                          "@type":"SFBool"
                                                        },
                                                        {
                                                          "@name":"setPlaneSensorIsActive",
                                                          "@accessType":"inputOnly",
                                                          "@type":"SFBool"
                                                        },
                                                        {
                                                          "@name":"setPlaneSensorTranslation",
                                                          "@accessType":"inputOnly",
                                                          "@type":"SFVec3f"
                                                        },
                                                        {
                                                          "@name":"translationChanged",
                                                          "@accessType":"outputOnly",
                                                          "@type":"SFVec3f"
                                                        },
                                                        {
                                                          "@name":"translationOffsetChanged",
                                                          "@accessType":"outputOnly",
                                                          "@type":"SFVec3f"
                                                        }
                                                      ],
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"description",
                                                              "@protoField":"description"
                                                            },
                                                            {
                                                              "@nodeField":"traceEnabled",
                                                              "@protoField":"traceEnabled"
                                                            },
                                                            {
                                                              "@nodeField":"locationOffset",
                                                              "@protoField":"locationOffset"
                                                            }
                                                          ]
                                                      },
                                                      "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (text)",
"{",
"    if (traceEnabled) Browser.println ('[DvdController ' + description + ' VisibilityControlScript] ' + text);",
"}",
"function initialize ()",
"{",
"    translationOffsetChanged = locationOffset;",
"    planeSensorTranslation   = locationOffset;",
"    setPlaneSensorIsActive (false, -1); // dummy timeStamp",
"}",
"function setIsVisible (value, timeStamp)",
"{",
"    isVisible = value;",
"    tracePrint('isVisible=' + value);",
"}",
"function setPlaneSensorIsActive (value, timeStamp)",
"{",
"    tracePrint('PlaneSensor isActive=' + value + ', translationOffsetChanged=' + translationOffsetChanged.toString());",
"",
"    if (value == false)",
"    {",
"            tracePrint('planeSensorTranslation=' + planeSensorTranslation.toString());",
"            if (isVisible)",
"            {",
"                    translationChanged = planeSensorTranslation;",
"            }",
"            else",
"            {",
"                    translationChanged = new SFVec3f(0, 0, 0);",
"                    translationOffsetChanged  = new SFVec3f(0, 0, 0);",
"            }",
"    }",
"}",
"function setPlaneSensorTranslation (value, timeStamp)",
"{",
"\tplaneSensorTranslation = value;",
"\ttracePrint('planeSensorTranslation=' + value.toString());",
"}",
"",
""
]
                                                    }
                                                  },
                                                  { "ROUTE":
                                                    {
                                                      "@fromField":"isActive",
                                                      "@fromNode":"PlaneMovementSensor",
                                                      "@toField":"setPlaneSensorIsActive",
                                                      "@toNode":"VisibilityControlScript"
                                                    }
                                                  },
                                                  { "ROUTE":
                                                    {
                                                      "@fromField":"translation_changed",
                                                      "@fromNode":"PlaneMovementSensor",
                                                      "@toField":"setPlaneSensorTranslation",
                                                      "@toNode":"VisibilityControlScript"
                                                    }
                                                  },
                                                  { "ROUTE":
                                                    {
                                                      "@fromField":"isActive",
                                                      "@fromNode":"MovementVisibilitySensor",
                                                      "@toField":"setIsVisible",
                                                      "@toNode":"VisibilityControlScript"
                                                    }
                                                  },
                                                  { "Switch":
                                                    {
                                                      "@DEF":"MovementControlSwitch",
                                                      "@whichChoice":0,
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"AllLayer",
                                                            "@translation":[-0.25,0,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@DEF":"MovementControlAppearance",
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@diffuseColor":[0.65,0.65,0.65]
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,1.75,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@DEF":"TwoLayer",
                                                            "@translation":[-0.25,-0.285,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"MovementControlAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,1.175,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@DEF":"OneLayer",
                                                            "@translation":[-0.25,-0.575,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"MovementControlAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "Switch":
                                              {
                                                "@DEF":"DisplayControlSwitch",
                                                "@whichChoice":0,
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayAllLayer",
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayAllToggle",
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@DEF":"ButtonBaseAppearance",
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@diffuseColor":[0.65,0.65,0.65]
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,1.75,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@DEF":"DisplayAllSensor",
                                                                  "@description":"display/hide all rows"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@DEF":"DisplayAllMaterial",
                                                                              "@diffuseColor":[0,0.35,0.8]
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":1.65,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayTopLayerToggle",
                                                            "@translation":[0.25,0.575,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@DEF":"DisplayTopLayerSensor",
                                                                  "@description":"hide top row"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@DEF":"DisplayControlMaterial",
                                                                              "@diffuseColor":[0,0.35,0.8]
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":0.5,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayMidLayerToggle",
                                                            "@translation":[0.25,0,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@DEF":"DisplayMidLayerSensor",
                                                                  "@description":"hide middle row"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@USE":"DisplayControlMaterial"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":0.5,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayBottomLayerToggle",
                                                            "@translation":[0.25,-0.575,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@DEF":"DisplayBottomLayerSensor",
                                                                  "@description":"hide bottom row"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@USE":"DisplayControlMaterial"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":0.5,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayTwoLayer",
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayTwoToggle",
                                                            "@translation":[0,-0.285,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,1.175,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@USE":"DisplayAllSensor"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@USE":"DisplayAllMaterial"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":1.08,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@USE":"DisplayMidLayerToggle"
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@USE":"DisplayBottomLayerToggle"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayOneLayer",
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayOneToggle",
                                                            "@translation":[0,-0.575,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@USE":"DisplayAllSensor"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@USE":"DisplayAllMaterial"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":0.5,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        { "Transform":
                                                          {
                                                            "@USE":"DisplayBottomLayerToggle"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayNoLayer",
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DisplayNoToggle",
                                                            "@translation":[0,-0.575,0],
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[0.25,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "TouchSensor":
                                                                {
                                                                  "@USE":"DisplayAllSensor"
                                                                }
                                                              },
                                                              { "Shape":
                                                                {
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "-material":
                                                                          { "Material":
                                                                            {
                                                                              "@USE":"DisplayAllMaterial"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Cylinder":
                                                                      {
                                                                        "@height":0.5,
                                                                        "@radius":0.1
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "Script":
                                              {
                                                "@DEF":"DisplayLayerScript",
                                                "field": [
                                                  {
                                                    "@name":"description",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFString"
                                                  },
                                                  {
                                                    "@name":"traceEnabled",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFBool"
                                                  },
                                                  {
                                                    "@name":"displayMode",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFString"
                                                  },
                                                  {
                                                    "@name":"setDisplayMode",
                                                    "@accessType":"inputOnly",
                                                    "@type":"SFString"
                                                  },
                                                  {
                                                    "@name":"displayAllToggleArmed",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFBool",
                                                    "@value":false
                                                  },
                                                  {
                                                    "@name":"topLayerToggleArmed",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFBool",
                                                    "@value":false
                                                  },
                                                  {
                                                    "@name":"midLayerToggleArmed",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFBool",
                                                    "@value":false
                                                  },
                                                  {
                                                    "@name":"bottomLayerToggleArmed",
                                                    "@accessType":"initializeOnly",
                                                    "@type":"SFBool",
                                                    "@value":false
                                                  },
                                                  {
                                                    "@name":"displayAllToggleEnabled",
                                                    "@accessType":"inputOnly",
                                                    "@type":"SFBool"
                                                  },
                                                  {
                                                    "@name":"topLayerToggleEnabled",
                                                    "@accessType":"inputOnly",
                                                    "@type":"SFBool"
                                                  },
                                                  {
                                                    "@name":"midLayerToggleEnabled",
                                                    "@accessType":"inputOnly",
                                                    "@type":"SFBool"
                                                  },
                                                  {
                                                    "@name":"bottomLayerToggleEnabled",
                                                    "@accessType":"inputOnly",
                                                    "@type":"SFBool"
                                                  },
                                                  {
                                                    "@name":"displayAllColor",
                                                    "@accessType":"outputOnly",
                                                    "@type":"SFColor"
                                                  },
                                                  {
                                                    "@name":"movementControlSwitchSelection",
                                                    "@accessType":"outputOnly",
                                                    "@appinfo":"0 - Display all three animation controls (DIS Mode Selection Playback Controls and Time scale) in a three layer stack. 1 - Display two of the three animation controls in a two layer stack. 2 - Display one of the three animation controls in a one layer stack.",
                                                    "@type":"SFInt32"
                                                  },
                                                  {
                                                    "@name":"displayControlSwitchSelection",
                                                    "@accessType":"outputOnly",
                                                    "@appinfo":"0 - Display all three animation controls (DIS Mode Selection Playback Controls and Time scale) in a three layer stack. 1 - Display two of the three animation controls in a two layer stack. 2 - Display one of the three animation controls in a one layer stack. 3 - Display no layers of animation controls.",
                                                    "@type":"SFInt32"
                                                  },
                                                  {
                                                    "@name":"topLayerSwitchSelection",
                                                    "@accessType":"outputOnly",
                                                    "@appinfo":"0 - Display DIS Mode (Master Remote Local) Selection at top layer. 1 - Do not display anything at top layer.",
                                                    "@type":"SFInt32"
                                                  },
                                                  {
                                                    "@name":"midLayerSwitchSelection",
                                                    "@accessType":"outputOnly",
                                                    "@appinfo":"0 - Display Playback Control Buttons (Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset To End) at the mid layer. 1 - Display DIS Mode Selection at the mid layer. 2 - Display nothing at the mid layer.",
                                                    "@type":"SFInt32"
                                                  },
                                                  {
                                                    "@name":"bottomLayerSwitchSelection",
                                                    "@accessType":"outputOnly",
                                                    "@appinfo":"0 - Display Time Scale at the bottom layer. 1 - Display DIS Mode Selection at the bottom layer. 2 - Display Playback Control Buttons at the bottom layer. 3 - Display nothing at the bottom layer.",
                                                    "@type":"SFInt32"
                                                  }
                                                ],
                                                "IS": {
                                                    "connect": [
                                                      {
                                                        "@nodeField":"description",
                                                        "@protoField":"description"
                                                      },
                                                      {
                                                        "@nodeField":"traceEnabled",
                                                        "@protoField":"traceEnabled"
                                                      },
                                                      {
                                                        "@nodeField":"displayMode",
                                                        "@protoField":"displayMode"
                                                      },
                                                      {
                                                        "@nodeField":"setDisplayMode",
                                                        "@protoField":"setDisplayMode"
                                                      }
                                                    ]
                                                },
                                                "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function initialize()",
"{",
"\tsetDisplayMode(displayMode, -1);",
"}",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[DvdController ' + description + ' DisplayLayerScript] ' + text);",
"}",
"function setDisplayMode(value, timeStamp)",
"{",
"\t// javascript switch statement is convenient but not consistently supported, so test the old-fashioned way:",
"",
"        if (displayMode == 'ALL')",
"\t{",
"            movementControlSwitchSelection = 0; //AllLayer",
"            displayControlSwitchSelection = 0;  //DisplayAllLayer",
"            displayAllColor = new SFColor(0, 0.35, 0.8);",
"            topLayerSwitchSelection = 0;",
"            midLayerSwitchSelection = 0;",
"            bottomLayerSwitchSelection = 0;",
"\t}",
"        else if (displayMode == 'DIS_ONLY')",
"        {",
"            movementControlSwitchSelection = 2; //OneLayer",
"            displayControlSwitchSelection = 2;  //DisplayOneLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 2;        //DisplayNoneMid",
"            bottomLayerSwitchSelection = 1;     //DisplayDISModeBottom",
"\t}",
"        else if (displayMode == 'PLAYBACK_ONLY')",
"        {",
"            movementControlSwitchSelection = 2; //OneLayer",
"            displayControlSwitchSelection = 2;  //DisplayOneLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 2;        //DisplayNoneMid",
"            bottomLayerSwitchSelection = 2;     //DisplayPlaybackButtonsBottom",
"\t}",
"        else if (displayMode == 'SLIDER_ONLY')",
"        {",
"            movementControlSwitchSelection = 2; //OneLayer",
"            displayControlSwitchSelection = 2;  //DisplayOneLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 2;        //DisplayNoneMid",
"            bottomLayerSwitchSelection = 0;     //DiaplaySliderBottom",
"\t}",
"        else if (displayMode == 'DIS_PLAYBACK')",
"        {",
"            movementControlSwitchSelection = 1; //TwoLayer",
"            displayControlSwitchSelection = 1;  //DisplayTwoLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 1;        //DisplayDISModeMid",
"            bottomLayerSwitchSelection = 2;     //DisplayPlaybackButtonsBottom",
"\t}",
"        else if (displayMode == 'DIS_SLIDER')",
"        {",
"            movementControlSwitchSelection = 1; //TwoLayer",
"            displayControlSwitchSelection = 1;  //DisplayTwoLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 1;        //DisplayDISModeMid",
"            bottomLayerSwitchSelection = 0;     //DisplaySliderBottom",
"\t}",
"        else if (displayMode == 'PLAYBACK_SLIDER')",
"        {",
"            movementControlSwitchSelection = 1; //TwoLayer",
"            displayControlSwitchSelection = 1;  //DisplayTwoLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 0;        //DisplayPlaybackButtosMid",
"            bottomLayerSwitchSelection = 0;     //DisplaySliderBottom",
"\t}",
"        else",
"        {",
"            if (displayMode != 'NONE')",
"                Browser.println ('Unknown value for displayMode=' + displayMode + ', assuming value of NONE');",
"",
"            movementControlSwitchSelection = 2; //OneLayer",
"            displayControlSwitchSelection = 3;  //DisplayNoLayer",
"            displayAllColor = new SFColor(1, 0, 0);",
"            topLayerSwitchSelection = 1;        //DisplayNoneTop",
"            midLayerSwitchSelection = 2;        //DisplayNoneMid",
"            bottomLayerSwitchSelection = 3;     //DisplayNoneBottom",
"\t}",
"}",
"",
"function displayAllToggleEnabled(value, timeStamp) {",
"\tif (displayAllToggleArmed == false)",
"\t{",
"\t\tdisplayAllToggleArmed = true;",
"\t\tif (displayControlSwitchSelection == 0)",
"\t\t{",
"\t\t\tmovementControlSwitchSelection = 2;",
"\t\t\tdisplayControlSwitchSelection = 3;",
"\t\t\tdisplayAllColor = new SFColor(1, 0, 0);",
"\t\t\ttopLayerSwitchSelection = 1;",
"\t\t\tmidLayerSwitchSelection = 2;",
"\t\t\tbottomLayerSwitchSelection = 3;",
"\t\t\ttracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection);",
"\t\t\ttracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection);",
"\t\t\ttracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection);",
"\t\t\ttracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection);",
"\t\t\ttracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection);",
"\t\t}",
"\t\telse //displayControlSwitchSelection not 0",
"\t\t{",
"\t\t\tmovementControlSwitchSelection = 0;",
"\t\t\tdisplayControlSwitchSelection = 0;",
"\t\t\tdisplayAllColor = new SFColor(0, 0.35, 0.8);",
"\t\t\ttopLayerSwitchSelection = 0;",
"\t\t\tmidLayerSwitchSelection = 0;",
"\t\t\tbottomLayerSwitchSelection = 0;",
"\t\t\ttracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection);",
"\t\t\ttracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection);",
"\t\t\ttracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection);",
"\t\t\ttracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection);",
"\t\t\ttracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection);",
"\t\t}",
"\t}",
"\telse",
"\t{",
"\t\tdisplayAllToggleArmed = false;",
"\t\treturn;",
"\t}",
"}",
"",
"function topLayerToggleEnabled(value, timeStamp) {",
"\tif (topLayerToggleArmed == false)",
"\t{",
"\t\ttopLayerToggleArmed = true;",
"\t\tdisplayControlSwitchSelection += 1;",
"\t\tif (displayControlSwitchSelection == 3)",
"\t\t\tmovementControlSwitchSelection = 2;",
"\t\telse",
"\t\t\tmovementControlSwitchSelection = displayControlSwitchSelection;",
"\t\tdisplayAllColor = new SFColor(1, 0, 0);",
"\t\ttopLayerSwitchSelection = 1;",
"\t\ttracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection);",
"\t\ttracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection);",
"\t\ttracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection);",
"\t}",
"\telse",
"\t{",
"\t\ttopLayerToggleArmed = false;",
"\t\treturn;",
"\t}",
"}",
"",
"function midLayerToggleEnabled(value, timeStamp) {",
"\tif (midLayerToggleArmed == false)",
"\t{",
"\t\tmidLayerToggleArmed = true;",
"\t\tdisplayControlSwitchSelection += 1;",
"\t\tif (displayControlSwitchSelection == 3)",
"\t\t\tmovementControlSwitchSelection = 2;",
"\t\telse",
"\t\t\tmovementControlSwitchSelection = displayControlSwitchSelection;",
"\t\tdisplayAllColor = new SFColor(1, 0, 0);",
"\t\tif (topLayerSwitchSelection == 0)",
"\t\t{",
"\t\t\ttopLayerSwitchSelection = 1;",
"\t\t\tmidLayerSwitchSelection = 1;",
"\t\t}",
"\t\telse",
"\t\t{",
"\t\t\tmidLayerSwitchSelection = 2;",
"\t\t}",
"\t\ttracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection);",
"\t\ttracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection);",
"\t\ttracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection);",
"\t\ttracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection);",
"\t}",
"\telse",
"\t{",
"\t\tmidLayerToggleArmed = false;",
"\t\treturn;",
"\t}",
"}",
"",
"function bottomLayerToggleEnabled(value, timeStamp) {",
"\tif (bottomLayerToggleArmed == false)",
"\t{",
"\t\tbottomLayerToggleArmed = true;",
"\t\tdisplayControlSwitchSelection += 1;",
"\t\tif (displayControlSwitchSelection == 3)",
"\t\t\tmovementControlSwitchSelection = 2;",
"\t\telse",
"\t\t\tmovementControlSwitchSelection = displayControlSwitchSelection;",
"\t\tdisplayAllColor = new SFColor(1, 0, 0);",
"\t\tif (topLayerSwitchSelection == 0) //if top display animation mode selection",
"\t\t{",
"\t\t\ttopLayerSwitchSelection = 1; //top display nothing",
"\t\t\tmidLayerSwitchSelection = 1; //mid display animation mode selection",
"\t\t\tbottomLayerSwitchSelection = 2; //bottom display playback control buttons",
"\t\t}",
"\t\telse if (midLayerSwitchSelection == 0) //if mid display playback control buttons",
"\t\t{",
"\t\t\t//top display nothing implied",
"\t\t\tmidLayerSwitchSelection = 2; //mid display nothing",
"\t\t\tbottomLayerSwitchSelection = 2; //bottom display playback control buttons",
"\t\t}",
"\t\telse if (midLayerSwitchSelection == 1) //if mid display animation mode selection",
"\t\t{",
"\t\t\t//top display nothing implied",
"\t\t\tmidLayerSwitchSelection = 2; //mid display nothing",
"\t\t\tbottomLayerSwitchSelection = 1; //bottom display animation mode selection",
"\t\t}",
"\t\telse //if mid display nothing",
"\t\t{",
"\t\t\t//top display nothing implied",
"\t\t\t//mid display nothing implied",
"\t\t\tbottomLayerSwitchSelection = 3; //bottom display nothing",
"\t\t}",
"",
"\t\ttracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection);",
"\t\ttracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection);",
"\t\ttracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection);",
"\t\ttracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection);",
"\t\ttracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection);",
"\t}",
"\telse",
"\t{",
"\t\tbottomLayerToggleArmed = false;",
"\t\treturn;",
"\t}",
"}",
"",
""
]
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"isActive",
                                                "@fromNode":"DisplayAllSensor",
                                                "@toField":"displayAllToggleEnabled",
                                                "@toNode":"DisplayLayerScript"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"isActive",
                                                "@fromNode":"DisplayTopLayerSensor",
                                                "@toField":"topLayerToggleEnabled",
                                                "@toNode":"DisplayLayerScript"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"isActive",
                                                "@fromNode":"DisplayMidLayerSensor",
                                                "@toField":"midLayerToggleEnabled",
                                                "@toNode":"DisplayLayerScript"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"isActive",
                                                "@fromNode":"DisplayBottomLayerSensor",
                                                "@toField":"bottomLayerToggleEnabled",
                                                "@toNode":"DisplayLayerScript"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"movementControlSwitchSelection",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"whichChoice",
                                                "@toNode":"MovementControlSwitch"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"displayControlSwitchSelection",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"whichChoice",
                                                "@toNode":"DisplayControlSwitch"
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"displayAllColor",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"diffuseColor",
                                                "@toNode":"DisplayAllMaterial"
                                              }
                                            },
                                            { "Switch":
                                              {
                                                "@DEF":"TopLayerSwitch",
                                                "@whichChoice":0,
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayDISModeTop",
                                                      "@translation":[2.86,0.58,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"DISModeButtons",
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "@DEF":"GroupButtonBaseShape",
                                                                  "-appearance":
                                                                    { "Appearance":
                                                                      {
                                                                        "@USE":"ButtonBaseAppearance"
                                                                      }
                                                                    },
                                                                  "-geometry":
                                                                    { "Box":
                                                                      {
                                                                        "@size":[5,0.6,0.05]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[-1.6,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"MasterSensor",
                                                                        "@description":"Master entity, send DIS PDU packets"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "@DEF":"PushButton",
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"MasterButtonMaterial",
                                                                                    "@diffuseColor":[0.9,0.9,0.9],
                                                                                    "@transparency":1
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@DEF":"DISModePushButton",
                                                                              "@ccw":false,
                                                                              "@coordIndex":[0,1,2,3,0,-1],
                                                                              "@solid":false,
                                                                              "-coord":
                                                                                { "Coordinate":
                                                                                  {
                                                                                    "@point":[-0.8,0.25,0.05,0.8,0.25,0.05,0.8,-0.25,0.05,-0.8,-0.25,0.05]
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[0,0,0.15],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"MasterLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@string":["networkWriter"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@DEF":"LabelFont",
                                                                                          "@justify":["MIDDLE","MIDDLE"],
                                                                                          "@size":0.2,
                                                                                          "@style":"BOLD"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"RemoteSensor",
                                                                        "@description":"Remote entity, read DIS PDU packets"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "@USE":"PushButton"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[0.1,0,0.25],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"RemoteLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@string":["networkReader"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@USE":"LabelFont"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[1.6,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"LocalSensor",
                                                                        "@description":"Local entity, no DIS traffic"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "@USE":"PushButton"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[0,0,0.15],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"LocalLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@string":["standAlone"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@USE":"LabelFont"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Script":
                                                                {
                                                                  "@DEF":"DISModeScript",
                                                                  "field": [
                                                                    {
                                                                      "@name":"description",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFString"
                                                                    },
                                                                    {
                                                                      "@name":"traceEnabled",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"buttonColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"activeButtonColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"labelColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"activeLabelColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"masterToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"remoteToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"localToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"masterButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"masterLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"remoteButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"remoteLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"localButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"localLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"isMaster",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"isRemote",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"isLocal",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"arePlaybackButtonsActive",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"playbackButtonLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartEnabled",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    }
                                                                  ],
                                                                  "IS": {
                                                                      "connect": [
                                                                        {
                                                                          "@nodeField":"description",
                                                                          "@protoField":"description"
                                                                        },
                                                                        {
                                                                          "@nodeField":"traceEnabled",
                                                                          "@protoField":"traceEnabled"
                                                                        },
                                                                        {
                                                                          "@nodeField":"buttonColor",
                                                                          "@protoField":"buttonColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"activeButtonColor",
                                                                          "@protoField":"selectedButtonColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"labelColor",
                                                                          "@protoField":"labelColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"activeLabelColor",
                                                                          "@protoField":"selectedLabelColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"isMaster",
                                                                          "@protoField":"isMaster"
                                                                        },
                                                                        {
                                                                          "@nodeField":"isRemote",
                                                                          "@protoField":"isRemote"
                                                                        },
                                                                        {
                                                                          "@nodeField":"isLocal",
                                                                          "@protoField":"isLocal"
                                                                        }
                                                                      ]
                                                                  },
                                                                  "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[DvdController ' + description + ' DISModeScript] ' + text);",
"}",
"",
"function initialize()",
"{",
"\tmasterButtonColor = buttonColor;",
"\tremoteButtonColor = buttonColor;",
"\tlocalButtonColor  = activeButtonColor;",
"",
"\tmasterLabelColor = labelColor;",
"\tremoteLabelColor = labelColor;",
"\tlocalLabelColor  = activeLabelColor;",
"",
"\tisMaster = false;",
"\tisRemote = false;",
"\tisLocal  = true;",
"\tarePlaybackButtonsActive = true;",
"",
"\t//set default mode",
"\tlocalToggleEnabled(true, -1);",
"}",
"",
"function masterToggleEnabled(value, timeStamp)",
"{",
"\tmasterButtonColor = activeButtonColor;",
"\tremoteButtonColor = buttonColor;",
"\tlocalButtonColor  = buttonColor;",
"",
"\tmasterLabelColor = activeLabelColor;",
"\tremoteLabelColor = labelColor;",
"\tlocalLabelColor  = labelColor;",
"",
"\tisMaster = true;",
"\tisRemote = false;",
"\tisLocal  = false;",
"",
"\tif (!arePlaybackButtonsActive)",
"\t\tplaybackButtonLabelColor = labelColor;",
"",
"\tarePlaybackButtonsActive = true;",
"}",
"",
"function remoteToggleEnabled(value, timeStamp)",
"{",
"\tmasterButtonColor = buttonColor;",
"\tremoteButtonColor = activeButtonColor;",
"\tlocalButtonColor  = buttonColor;",
"",
"\tmasterLabelColor = labelColor;",
"\tremoteLabelColor = activeLabelColor;",
"\tlocalLabelColor  = labelColor;",
"",
"\tisMaster = false;",
"\tisRemote = true;",
"\tisLocal  = false;",
"",
"\tarePlaybackButtonsActive = false;",
"\tplaybackButtonLabelColor = labelColor;",
"\tresetToStartEnabled = true;",
"}",
"",
"function localToggleEnabled(value, timeStamp)",
"{",
"\tmasterButtonColor = buttonColor;",
"\tremoteButtonColor = buttonColor;",
"\tlocalButtonColor  = activeButtonColor;",
"",
"\tmasterLabelColor = labelColor;",
"\tremoteLabelColor = labelColor;",
"\tlocalLabelColor  = activeLabelColor;",
"",
"\tisMaster = false;",
"\tisRemote = false;",
"\tisLocal  = true;",
"",
"\tif (!arePlaybackButtonsActive)",
"\t\tplaybackButtonLabelColor = labelColor;",
"",
"\tarePlaybackButtonsActive = true;",
"}",
"",
""
]
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"masterButtonColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"MasterButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"masterLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"MasterLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"remoteLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"RemoteLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"localLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"LocalLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"MasterSensor",
                                                                  "@toField":"masterToggleEnabled",
                                                                  "@toNode":"DISModeScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"RemoteSensor",
                                                                  "@toField":"remoteToggleEnabled",
                                                                  "@toNode":"DISModeScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"LocalSensor",
                                                                  "@toField":"localToggleEnabled",
                                                                  "@toNode":"DISModeScript"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayNoneTop"
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"topLayerSwitchSelection",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"whichChoice",
                                                "@toNode":"TopLayerSwitch"
                                              }
                                            },
                                            { "Switch":
                                              {
                                                "@DEF":"MidLayerSwitch",
                                                "@whichChoice":0,
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayPlaybackButtonsMid",
                                                      "@translation":[2.86,0,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"PlaybackButtons",
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "@USE":"GroupButtonBaseShape"
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[-2.05,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"ResetToStartSensor",
                                                                        "@description":"reset clock to beginning"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@DEF":"InvisibleButtonBox",
                                                                        "@translation":[0.03,0.02,0.1],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@transparency":1
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Box":
                                                                                  {
                                                                                    "@size":[0.6,0.4,0.001]
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"ResetToStartButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@DEF":"PlaybackButton",
                                                                              "@coordIndex":[3,2,1,0,3,-1],
                                                                              "@solid":false,
                                                                              "-coord":
                                                                                { "Coordinate":
                                                                                  {
                                                                                    "@point":[-0.375,0.25,0.05,0.375,0.25,0.05,0.375,-0.25,0.05,-0.375,-0.25,0.05]
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[-0.12,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@DEF":"ResetToStartLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "Box":
                                                                                        {
                                                                                          "@DEF":"Bar",
                                                                                          "@size":[0.04,0.3,0.12]
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0.01,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@USE":"ResetToStartLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@DEF":"Triangle",
                                                                                          "@coordIndex":[0,1,2,-1],
                                                                                          "-coord":
                                                                                            { "Coordinate":
                                                                                              {
                                                                                                "@point":[-0.15,0,0.051,0.15,-0.15,0.051,0.15,0.15,0.051]
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[-1.36,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"FastRewindSensor",
                                                                        "@description":"fast rewind"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"FastRewindButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[-0.15,0.0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@DEF":"FastRewindLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@USE":"Triangle"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0.1,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@USE":"FastRewindLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@USE":"Triangle"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[-0.68,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"RewindSensor",
                                                                        "@description":"rewind"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"RewindButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"RewindLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "IndexedFaceSet":
                                                                                  {
                                                                                    "@USE":"Triangle"
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"PauseSensor",
                                                                        "@description":"pause"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"PauseButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[-0.05,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@DEF":"PauseLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "Box":
                                                                                        {
                                                                                          "@USE":"Bar"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0.085,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@USE":"PauseLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "Box":
                                                                                        {
                                                                                          "@USE":"Bar"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[0.68,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"PlaySensor",
                                                                        "@description":"play"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"PlayButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@rotation":[0,0,1,3.14],
                                                                        "@translation":[0.05,0,0],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"PlayLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "IndexedFaceSet":
                                                                                  {
                                                                                    "@USE":"Triangle"
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[1.36,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"FastForwardSensor",
                                                                        "@description":"fast forward"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"FastForwardButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@rotation":[0,0,1,3.14],
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[-0.15,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@DEF":"FastForwardLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@USE":"Triangle"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0.1,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@USE":"FastForwardLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@USE":"Triangle"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[2.05,0,0],
                                                                  "-children":[
                                                                    { "TouchSensor":
                                                                      {
                                                                        "@DEF":"ResetToEndSensor",
                                                                        "@description":"reset clock to end"
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@USE":"InvisibleButtonBox"
                                                                      }
                                                                    },
                                                                    { "Shape":
                                                                      {
                                                                        "-appearance":
                                                                          { "Appearance":
                                                                            {
                                                                              "-material":
                                                                                { "Material":
                                                                                  {
                                                                                    "@DEF":"ResetToEndButtonMaterial",
                                                                                    "@transparency":0.9
                                                                                  }
                                                                                }
                                                                            }
                                                                          },
                                                                        "-geometry":
                                                                          { "IndexedFaceSet":
                                                                            {
                                                                              "@USE":"PlaybackButton"
                                                                            }
                                                                          }
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "-children":[
                                                                          { "Transform":
                                                                            {
                                                                              "@rotation":[0,0,1,3.14],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@DEF":"ResetToEndLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "IndexedFaceSet":
                                                                                        {
                                                                                          "@USE":"Triangle"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          },
                                                                          { "Transform":
                                                                            {
                                                                              "@translation":[0.12,0,0],
                                                                              "-children":[
                                                                                { "Shape":
                                                                                  {
                                                                                    "-appearance":
                                                                                      { "Appearance":
                                                                                        {
                                                                                          "-material":
                                                                                            { "Material":
                                                                                              {
                                                                                                "@USE":"ResetToEndLabelMaterial"
                                                                                              }
                                                                                            }
                                                                                        }
                                                                                      },
                                                                                    "-geometry":
                                                                                      { "Box":
                                                                                        {
                                                                                          "@USE":"Bar"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                              ]
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Script":
                                                                {
                                                                  "@DEF":"PlaybackControlScript",
                                                                  "field": [
                                                                    {
                                                                      "@name":"description",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFString"
                                                                    },
                                                                    {
                                                                      "@name":"traceEnabled",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"playEnabled",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"buttonColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"activeButtonColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"labelColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"activeLabelColor",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"isActive",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":true
                                                                    },
                                                                    {
                                                                      "@name":"setIsActive",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"fastRewindToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"rewindToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"pauseToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"playToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"fastForwardToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"resetToEndToggleArmed",
                                                                      "@accessType":"initializeOnly",
                                                                      "@type":"SFBool",
                                                                      "@value":false
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"fastRewindToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"rewindToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"pauseToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"playToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"fastForwardToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"resetToEndToggleEnabled",
                                                                      "@accessType":"inputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"fastRewindButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"fastRewindLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"rewindButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"rewindLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"pauseButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"pauseLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"playButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"playLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"fastForwardButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"fastForwardLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"resetToEndButtonColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"resetToEndLabelColor",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFColor"
                                                                    },
                                                                    {
                                                                      "@name":"isPaused",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"isRunning",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"resetToStartChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"fastRewindChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"rewindChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"pauseChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"playChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"fastForwardChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    },
                                                                    {
                                                                      "@name":"resetToEndChanged",
                                                                      "@accessType":"outputOnly",
                                                                      "@type":"SFBool"
                                                                    }
                                                                  ],
                                                                  "IS": {
                                                                      "connect": [
                                                                        {
                                                                          "@nodeField":"description",
                                                                          "@protoField":"description"
                                                                        },
                                                                        {
                                                                          "@nodeField":"traceEnabled",
                                                                          "@protoField":"traceEnabled"
                                                                        },
                                                                        {
                                                                          "@nodeField":"playEnabled",
                                                                          "@protoField":"playEnabled"
                                                                        },
                                                                        {
                                                                          "@nodeField":"buttonColor",
                                                                          "@protoField":"buttonColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"activeButtonColor",
                                                                          "@protoField":"selectedButtonColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"labelColor",
                                                                          "@protoField":"labelColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"activeLabelColor",
                                                                          "@protoField":"selectedLabelColor"
                                                                        },
                                                                        {
                                                                          "@nodeField":"isPaused",
                                                                          "@protoField":"isPaused"
                                                                        },
                                                                        {
                                                                          "@nodeField":"isRunning",
                                                                          "@protoField":"isRunning"
                                                                        }
                                                                      ]
                                                                  },
                                                                  "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[DvdController ' + description + ' PlaybackControlScript] ' + text);",
"}",
"function TraceLabelColors ()",
"{",
"\tif (traceEnabled == false) return;",
"",
"\tBrowser.println ('\tbuttonColor=' + buttonColor.toString());",
"\tBrowser.println ('\tactiveButtonColor=' + activeButtonColor.toString());",
"\tBrowser.println ('\tlabelColor=' + labelColor.toString());",
"\tBrowser.println ('\tactiveLabelColor=' + activeLabelColor.toString());",
"",
"\tBrowser.println ('\tresetToStartLabelColor=' + resetToStartLabelColor.toString());",
"\tBrowser.println ('\tfastRewindLabelColor=' + fastRewindLabelColor.toString());",
"\tBrowser.println ('\trewindLabelColor=' + rewindLabelColor.toString());",
"\tBrowser.println ('\tpauseLabelColor=' + pauseLabelColor.toString());",
"\tBrowser.println ('\tplayLabelColor=' + playLabelColor.toString());",
"\tBrowser.println ('\tfastForwardLabelColor=' + fastForwardLabelColor.toString());",
"\tBrowser.println ('\tresetToEndLabelColor=' + resetToEndLabelColor.toString());",
"}",
"function initialize()",
"{",
"\ttracePrint ('initialize() starting...');",
"\tif (!playEnabled)",
"\t{",
"\t\tresetToStartButtonColor = buttonColor;",
"\t\tfastRewindButtonColor   = buttonColor;",
"\t\trewindButtonColor       = buttonColor;",
"\t\tpauseButtonColor        = activeButtonColor;",
"\t\tplayButtonColor         = buttonColor;",
"\t\tfastForwardButtonColor  = buttonColor;",
"\t\tresetToEndButtonColor   = buttonColor;",
"",
"\t\tresetToStartLabelColor  = labelColor;",
"\t\tfastRewindLabelColor    = labelColor;",
"\t\trewindLabelColor        = labelColor;",
"\t\tpauseLabelColor         = activeLabelColor;",
"\t\tplayLabelColor          = labelColor;",
"\t\tfastForwardLabelColor   = labelColor;",
"\t\tresetToEndLabelColor    = labelColor;",
"",
"\t\tisPaused = true;",
"\t\tisRunning = false;",
"\t\tTraceLabelColors ();",
"\t}",
"\telse //\tplayEnabled == true",
"\t{",
"\t\tplayToggleEnabled(true, -1); // dummy timeStamp",
"\t\tplayToggleArmed = false;",
"\t}",
"\ttracePrint ('...initialize() complete');",
"}",
"function setIsActive(value, timeStamp)",
"{",
"\tisActive = value;",
"}",
"function resetToStartToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('resetToStartToggleEnabled (' + value + ')' + ', resetToStartToggleArmed=' + resetToStartToggleArmed);",
"",
"\tif (!resetToStartToggleArmed)",
"\t{",
"\t\tresetToStartButtonColor = activeButtonColor;",
"\t\tresetToStartLabelColor  = activeLabelColor;",
"\t\tresetToStartToggleArmed = true;",
"\t\treturn;",
"\t}",
"\tisPaused  = true;",
"\tisRunning = false;",
"\tresetToStartChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = activeButtonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = activeLabelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"function fastRewindToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('fastRewindToggleEnabled (' + value + ')' + ', fastRewindToggleArmed=' + fastRewindToggleArmed);",
"",
"\tif (fastRewindToggleArmed)",
"\t{",
"\t\tfastRewindToggleArmed = false;",
"\t\treturn;",
"\t}",
"\tisPaused  = true;",
"\tisRunning = false;",
"\tfastRewindChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = activeButtonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = activeLabelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
"function rewindToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('rewindToggleEnabled (' + value + ')' + ', rewindToggleArmed=' + rewindToggleArmed);",
"",
"\tif (rewindToggleArmed)",
"\t{",
"\t\trewindToggleArmed = false;",
"\t\treturn;",
"\t}",
"\tisPaused  = true;",
"\tisRunning = false;",
"\trewindChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = activeButtonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = activeLabelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
"function pauseToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('pauseToggleEnabled (' + value + ')' + ', pauseToggleArmed=' + pauseToggleArmed);",
"",
"\tif (pauseToggleArmed)",
"\t{",
"\t\tpauseToggleArmed = false;",
"\t\treturn;",
"\t}",
"\tisPaused  = true;",
"\tisRunning = false;",
"\tpauseChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = activeButtonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = activeLabelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
"function playToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('playToggleEnabled (' + value + ')' + ', pauseToggleArmed=' + playToggleArmed);",
"",
"\tif (playToggleArmed)",
"\t{",
"\t\tplayToggleArmed = false;",
"\t\treturn;",
"\t}",
"\tisPaused  = false;",
"\tisRunning = true;",
"\tplayChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = activeButtonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = activeLabelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
"function fastForwardToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('fastForwardToggleEnabled (' + value + ')' + ', fastForwardToggleArmed=' + fastForwardToggleArmed);",
"",
"\tif (fastForwardToggleArmed)",
"\t{",
"\t\tfastForwardToggleArmed = false;",
"\t\treturn;",
"\t}",
"\tisPaused  = false;",
"\tisRunning = true;",
"\tfastForwardChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = activeButtonColor;",
"\tresetToEndButtonColor   = buttonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = activeLabelColor;",
"\tresetToEndLabelColor   = labelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
"function resetToEndToggleEnabled(value, timeStamp)",
"{",
"\tif (value == false) return;",
"\ttracePrint ('resetToEndToggleEnabled (' + value + ')' + ', resetToEndToggleArmed=' + resetToEndToggleArmed);",
"",
"\tif (!resetToEndToggleArmed)",
"\t{",
"\t\tresetToEndButtonColor = activeButtonColor;",
"\t\tresetToEndLabelColor = activeLabelColor;",
"\t\tresetToEndToggleArmed = true;",
"\t\treturn;",
"\t}",
"\tisPaused  = true;",
"\tisRunning = false;",
"\tresetToEndChanged = true;",
"",
"\tif (!isActive) return;",
"",
"\tresetToStartButtonColor = buttonColor;",
"\tfastRewindButtonColor   = buttonColor;",
"\trewindButtonColor       = buttonColor;",
"\tpauseButtonColor        = buttonColor;",
"\tplayButtonColor         = buttonColor;",
"\tfastForwardButtonColor  = buttonColor;",
"\tresetToEndButtonColor   = activeButtonColor;",
"",
"\tresetToStartLabelColor = labelColor;",
"\tfastRewindLabelColor   = labelColor;",
"\trewindLabelColor       = labelColor;",
"\tpauseLabelColor        = labelColor;",
"\tplayLabelColor         = labelColor;",
"\tfastForwardLabelColor  = labelColor;",
"\tresetToEndLabelColor   = activeLabelColor;",
"",
"\tTraceLabelColors ();",
"}",
"",
""
]
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"setIsActive",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"resetToStartEnabled",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"resetToStartToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToStartLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastRewindLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"RewindLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PauseLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PlayLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastForwardLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playbackButtonLabelColor",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToEndLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"ResetToStartSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"FastRewindSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"RewindSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"PauseSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"PlaySensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"FastForwardSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"arePlaybackButtonsActive",
                                                                  "@fromNode":"DISModeScript",
                                                                  "@toField":"enabled",
                                                                  "@toNode":"ResetToEndSensor"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"resetToStartButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToStartButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"resetToStartLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToStartLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"fastRewindButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastRewindButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"fastRewindLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastRewindLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"rewindButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"RewindButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"rewindLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"RewindLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"pauseButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PauseButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"pauseLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PauseLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PlayButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"playLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"PlayLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"fastForwardButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastForwardButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"fastForwardLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"FastForwardLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"resetToEndButtonColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToEndButtonMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"resetToEndLabelColor",
                                                                  "@fromNode":"PlaybackControlScript",
                                                                  "@toField":"diffuseColor",
                                                                  "@toNode":"ResetToEndLabelMaterial"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"ResetToStartSensor",
                                                                  "@toField":"resetToStartToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"FastRewindSensor",
                                                                  "@toField":"fastRewindToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"RewindSensor",
                                                                  "@toField":"rewindToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"PauseSensor",
                                                                  "@toField":"pauseToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"PlaySensor",
                                                                  "@toField":"playToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"FastForwardSensor",
                                                                  "@toField":"fastForwardToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              },
                                                              { "ROUTE":
                                                                {
                                                                  "@fromField":"isActive",
                                                                  "@fromNode":"ResetToEndSensor",
                                                                  "@toField":"resetToEndToggleEnabled",
                                                                  "@toNode":"PlaybackControlScript"
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayDISModeMid",
                                                      "@translation":[2.86,0,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@USE":"DISModeButtons"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayNoneMid"
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"midLayerSwitchSelection",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"whichChoice",
                                                "@toNode":"MidLayerSwitch"
                                              }
                                            },
                                            { "Switch":
                                              {
                                                "@DEF":"BottomLayerSwitch",
                                                "@whichChoice":0,
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplaySliderBottom",
                                                      "@translation":[2.86,-0.58,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@DEF":"TimeScale",
                                                            "-children":[
                                                              { "Shape":
                                                                {
                                                                  "@USE":"GroupButtonBaseShape"
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[0,-0.15,0],
                                                                  "-children":[
                                                                    { "ProtoInstance":
                                                                      {
                                                                        "@name":"SliderFloat",
                                                                        "@DEF":"Slider",
                                                                        "fieldValue": [
                                                                          {
                                                                            "@name":"layoutDirection",
                                                                            "@value":"horizontal"
                                                                          },
                                                                          {
                                                                            "@name":"height",
                                                                            "@value":4.725
                                                                          },
                                                                          {
                                                                            "@name":"radius",
                                                                            "@value":0.1
                                                                          },
                                                                          {
                                                                            "@name":"barRadius",
                                                                            "@value":0.035
                                                                          },
                                                                          {
                                                                            "@name":"min",
                                                                            "@value":0.0
                                                                          },
                                                                          {
                                                                            "@name":"max",
                                                                            "@value":1.0
                                                                          },
                                                                          {
                                                                            "@name":"value",
                                                                            "@value":0.0
                                                                          },
                                                                          {
                                                                            "@name":"traceEnabled",
                                                                            "@value":true
                                                                          }
                                                                        ]
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              },
                                                              { "Transform":
                                                                {
                                                                  "@translation":[0,0,0.05],
                                                                  "-children":[
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[-1.4,0,0],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "@DEF":"TimeLabelAppearance",
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@DEF":"TimeLabelMaterial",
                                                                                          "IS": {
                                                                                              "connect": [
                                                                                                {
                                                                                                  "@nodeField":"diffuseColor",
                                                                                                  "@protoField":"labelColor"
                                                                                                }
                                                                                              ]
                                                                                          }
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@DEF":"DurationText",
                                                                                    "@string":["00h00m00s"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@DEF":"TimeLabelFont",
                                                                                          "@size":0.2,
                                                                                          "@style":"ITALIC"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[-2.4,0,0],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "@USE":"TimeLabelAppearance"
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@string":["duration:"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@USE":"TimeLabelFont"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[0.0,0,0],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@USE":"TimeLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@string":["elapsed:"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@USE":"TimeLabelFont"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Transform":
                                                                      {
                                                                        "@translation":[0.9,0,0],
                                                                        "-children":[
                                                                          { "Shape":
                                                                            {
                                                                              "-appearance":
                                                                                { "Appearance":
                                                                                  {
                                                                                    "-material":
                                                                                      { "Material":
                                                                                        {
                                                                                          "@USE":"TimeLabelMaterial"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                },
                                                                              "-geometry":
                                                                                { "Text":
                                                                                  {
                                                                                    "@DEF":"secondsElapsedText",
                                                                                    "@string":["00h00m00s"],
                                                                                    "-fontStyle":
                                                                                      { "FontStyle":
                                                                                        {
                                                                                          "@USE":"TimeLabelFont"
                                                                                        }
                                                                                      }
                                                                                  }
                                                                                }
                                                                            }
                                                                          }
                                                                        ]
                                                                      }
                                                                    },
                                                                    { "Script":
                                                                      {
                                                                        "@DEF":"TimeScaleScript",
                                                                        "field": [
                                                                          {
                                                                            "@name":"description",
                                                                            "@accessType":"initializeOnly",
                                                                            "@type":"SFString"
                                                                          },
                                                                          {
                                                                            "@name":"traceEnabled",
                                                                            "@accessType":"initializeOnly",
                                                                            "@type":"SFBool"
                                                                          },
                                                                          {
                                                                            "@name":"duration",
                                                                            "@accessType":"inputOutput",
                                                                            "@type":"SFTime"
                                                                          },
                                                                          {
                                                                            "@name":"secondsElapsed",
                                                                            "@accessType":"initializeOnly",
                                                                            "@type":"SFTime",
                                                                            "@value":0
                                                                          },
                                                                          {
                                                                            "@name":"setSecondsElapsed",
                                                                            "@accessType":"inputOnly",
                                                                            "@type":"SFTime"
                                                                          },
                                                                          {
                                                                            "@name":"durationOutput",
                                                                            "@accessType":"outputOnly",
                                                                            "@type":"MFString"
                                                                          },
                                                                          {
                                                                            "@name":"secondsElapsedOutput",
                                                                            "@accessType":"outputOnly",
                                                                            "@type":"MFString"
                                                                          }
                                                                        ],
                                                                        "IS": {
                                                                            "connect": [
                                                                              {
                                                                                "@nodeField":"description",
                                                                                "@protoField":"description"
                                                                              },
                                                                              {
                                                                                "@nodeField":"traceEnabled",
                                                                                "@protoField":"traceEnabled"
                                                                              },
                                                                              {
                                                                                "@nodeField":"duration",
                                                                                "@protoField":"cycleInterval"
                                                                              }
                                                                            ]
                                                                        },
                                                                        "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) forcePrint (text);",
"}",
"",
"function forcePrint (text)",
"{",
"\tBrowser.println ('[DvdController ' + description + ' TimeScaleScript] ' + text);",
"}",
"",
"function initialize()",
"{",
"        tracePrint ('initialize duration:');",
"\tset_duration(duration, -1); // dummy timeStamp",
"\tsecondsElapsedOutput = new MFString('00h00m00s');",
"}",
"",
"function set_duration(value, timeStamp)",
"{",
"\tduration = Math.floor(value);",
"        tracePrint ('set_cycleInterval value=' + value + ', duration=' + duration);",
"\tdurationOutput = new MFString(printTime(duration));",
"        forcePrint ('duration=' + durationOutput.toString());",
"}",
"",
"function setSecondsElapsed(value, timeStamp)",
"{",
"\tsecondsElapsed = Math.floor(value);",
"\tsecondsElapsedOutput = new MFString(printTime(secondsElapsed));",
"        tracePrint ('secondsElapsedOutput=' + secondsElapsedOutput.toString());",
"}",
"",
"function printTime(value)",
"{",
"\ttimeInSeconds = value;",
"\tseconds = timeInSeconds % 60;",
"\tminute = ((timeInSeconds - seconds) / 60) % 60;",
"\thour = (timeInSeconds - minute * 60 - seconds) / 3600;",
"\thStr = (hour    < 10 ? '0' + hour    : '' + hour);",
"\tmStr = (minute  < 10 ? '0' + minute  : '' + minute);",
"\tsStr = (seconds < 10 ? '0' + seconds : '' + seconds);",
"\ttimeString = new SFString( hStr + 'h' + mStr + 'm' + sStr + 's');",
"        tracePrint ('timeString=' + timeString.toString());",
"\treturn timeString;",
"}",
"",
""
]
                                                                      }
                                                                    },
                                                                    { "ROUTE":
                                                                      {
                                                                        "@fromField":"durationOutput",
                                                                        "@fromNode":"TimeScaleScript",
                                                                        "@toField":"string",
                                                                        "@toNode":"DurationText"
                                                                      }
                                                                    },
                                                                    { "ROUTE":
                                                                      {
                                                                        "@fromField":"secondsElapsedOutput",
                                                                        "@fromNode":"TimeScaleScript",
                                                                        "@toField":"string",
                                                                        "@toNode":"secondsElapsedText"
                                                                      }
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayDISModeBottom",
                                                      "@translation":[2.86,-0.58,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@USE":"DISModeButtons"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayPlaybackButtonsBottom",
                                                      "@translation":[2.86,-0.58,0],
                                                      "-children":[
                                                        { "Transform":
                                                          {
                                                            "@USE":"PlaybackButtons"
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"DisplayNoneBottom"
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "ROUTE":
                                              {
                                                "@fromField":"bottomLayerSwitchSelection",
                                                "@fromNode":"DisplayLayerScript",
                                                "@toField":"whichChoice",
                                                "@toNode":"BottomLayerSwitch"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "ROUTE":
                                        {
                                          "@fromField":"translation_changed",
                                          "@fromNode":"PlaneMovementSensor",
                                          "@toField":"set_translation",
                                          "@toNode":"MovableLocation"
                                        }
                                      },
                                      { "ROUTE":
                                        {
                                          "@fromField":"translationChanged",
                                          "@fromNode":"VisibilityControlScript",
                                          "@toField":"set_translation",
                                          "@toNode":"MovableLocation"
                                        }
                                      },
                                      { "ROUTE":
                                        {
                                          "@fromField":"translationOffsetChanged",
                                          "@fromNode":"VisibilityControlScript",
                                          "@toField":"set_offset",
                                          "@toNode":"PlaneMovementSensor"
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"position_changed",
                              "@fromNode":"WhereSensor",
                              "@toField":"set_translation",
                              "@toNode":"FixedLocation"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"orientation_changed",
                              "@fromNode":"WhereSensor",
                              "@toField":"set_rotation",
                              "@toNode":"FixedLocation"
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"ForwardClock"
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"FastForwardClock"
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"RewindClock"
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"FastRewindClock"
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"SliderClock"
                            }
                          },
                          { "Script":
                            {
                              "@DEF":"ClockScript",
                              "field": [
                                {
                                  "@name":"description",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFString"
                                },
                                {
                                  "@name":"traceEnabled",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"duration",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"set_duration",
                                  "@accessType":"inputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"durationChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"forwardCycleInterval",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastForwardCycleInterval",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"rewindCycleInterval",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastRewindCycleInterval",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"sliderClockCycleInterval",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"speedFactor",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"startTime",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFTime",
                                  "@value":-1
                                },
                                {
                                  "@name":"startTime_changed",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"stopTime",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFTime",
                                  "@value":-1
                                },
                                {
                                  "@name":"stopTime_changed",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"rewindStartTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"rewindStopTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastForwardStartTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastForwardStopTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastRewindStartTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fastRewindStopTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"sliderClockStartTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"sliderClockStopTime",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"time",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFTime",
                                  "@value":-1
                                },
                                {
                                  "@name":"setTime",
                                  "@accessType":"inputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"time_changed",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"isClockActive",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFBool",
                                  "@value":false
                                },
                                {
                                  "@name":"setIsClockActive",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isClockActiveChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"secondsElapsed",
                                  "@accessType":"outputOnly",
                                  "@type":"SFTime"
                                },
                                {
                                  "@name":"fraction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"setFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"setFastForwardFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"setRewindFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"setFastRewindFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"setSliderDragFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"setSliderClockFraction",
                                  "@accessType":"inputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"fraction_changed",
                                  "@accessType":"outputOnly",
                                  "@type":"SFFloat"
                                },
                                {
                                  "@name":"isResetToStart",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setResetToStart",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isFastRewind",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setFastRewind",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isRewinding",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setRewind",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setPaused",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isPlaying",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setPlay",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isFastForward",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setFastForward",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"isResetToEnd",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"setResetToEnd",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"sliderClockEnabled",
                                  "@accessType":"outputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"sliderDragArmed",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFBool",
                                  "@value":false
                                },
                                {
                                  "@name":"setSliderDragged",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"pauseTime",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFTime",
                                  "@value":-1
                                },
                                {
                                  "@name":"activateButtonColor",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"activateLabelColor",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"deactivateButtonColor",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"arePlaybackButtonsActive",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFBool",
                                  "@value":true
                                },
                                {
                                  "@name":"setarePlaybackButtonsActive",
                                  "@accessType":"inputOnly",
                                  "@type":"SFBool"
                                },
                                {
                                  "@name":"deactivateButtonColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"deactivateLabelColor",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"deactivateLabelColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"playButtonActivateColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"playLabelActivateColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"rewindButtonActivateColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"rewindLabelActivateColorChanged",
                                  "@accessType":"outputOnly",
                                  "@type":"SFColor"
                                },
                                {
                                  "@name":"rewindStart_fraction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"fastRewindStart_fraction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"sliderClockStart_fraction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"fastRewind_level",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"fastForward_level",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                },
                                {
                                  "@name":"preDrag_fraction",
                                  "@accessType":"initializeOnly",
                                  "@type":"SFFloat",
                                  "@value":0
                                }
                              ],
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"description",
                                      "@protoField":"description"
                                    },
                                    {
                                      "@nodeField":"traceEnabled",
                                      "@protoField":"traceEnabled"
                                    },
                                    {
                                      "@nodeField":"deactivateButtonColor",
                                      "@protoField":"buttonColor"
                                    },
                                    {
                                      "@nodeField":"activateButtonColor",
                                      "@protoField":"selectedButtonColor"
                                    },
                                    {
                                      "@nodeField":"deactivateLabelColor",
                                      "@protoField":"labelColor"
                                    },
                                    {
                                      "@nodeField":"activateLabelColor",
                                      "@protoField":"selectedLabelColor"
                                    },
                                    {
                                      "@nodeField":"duration",
                                      "@protoField":"cycleInterval"
                                    },
                                    {
                                      "@nodeField":"set_duration",
                                      "@protoField":"set_cycleInterval"
                                    },
                                    {
                                      "@nodeField":"durationChanged",
                                      "@protoField":"cycleInterval_changed"
                                    },
                                    {
                                      "@nodeField":"speedFactor",
                                      "@protoField":"speedFactor"
                                    },
                                    {
                                      "@nodeField":"isClockActiveChanged",
                                      "@protoField":"isActive"
                                    },
                                    {
                                      "@nodeField":"startTime_changed",
                                      "@protoField":"startTime_changed"
                                    },
                                    {
                                      "@nodeField":"stopTime_changed",
                                      "@protoField":"stopTime_changed"
                                    },
                                    {
                                      "@nodeField":"time_changed",
                                      "@protoField":"time_changed"
                                    },
                                    {
                                      "@nodeField":"fraction_changed",
                                      "@protoField":"fraction_changed"
                                    },
                                    {
                                      "@nodeField":"secondsElapsed",
                                      "@protoField":"secondsElapsed"
                                    }
                                  ]
                              },
                              "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function tracePrint (text)",
"{",
"\tif (traceEnabled) Browser.println ('[DvdController ' + description + ' ClockScript] ' + text);",
"}",
"function alwaysPrint(output)",
"{",
"\tBrowser.println ('[DvdController ' + description + ' ClockScript] ' + output);",
"}",
"",
"function initialize()",
"{",
"\tisResetToStart = false;",
"\tisFastRewind = false;",
"\tisRewinding = false;",
"\tisPlaying = false;",
"\tisFastForward = false;",
"\tisResetToEnd = false;",
"",
"\tdurationChanged = duration;",
"\tforwardCycleInterval = duration;",
"\tfastForwardCycleInterval = duration;",
"\trewindCycleInterval = duration;",
"\tfastRewindCycleInterval = duration;",
"\tsliderClockCycleInterval = duration;",
"",
"\tfraction = 0;",
"\tfastRewind_level = 0;",
"\tfastForward_level = 0;",
"\tsliderClockStart_fraction = 0;",
"}",
"",
"function set_duration(value, timeStamp)",
"{",
"\tduration = value;",
"\tdurationChanged = value;",
"\tforwardCycleInterval = duration;",
"\tfastForwardCycleInterval = duration;",
"\trewindCycleInterval = duration;",
"\tfastRewindCycleInterval = duration;",
"\tsliderClockCycleInterval = duration;",
"\talwaysPrint ('set_duration (' + duration + ') complete');",
"}",
"",
"function setarePlaybackButtonsActive(value, timeStamp)",
"{",
"\tarePlaybackButtonsActive = value;",
"\ttracePrint('arePlaybackButtonsActive=' + arePlaybackButtonsActive);",
"}",
"",
"function setIsClockActive(value, timeStamp)",
"{",
"\tisClockActive = isClockActiveChanged = value;",
"\ttracePrint('isClockActive=' + isClockActive);",
"}",
"",
"function setResetToStart(value, timeStamp)",
"{",
"\ttracePrint('setResetToStart(' + value + ')');",
"\tisResetToStart = true;",
"",
"\t//Stop all clocks",
"\tisPlaying = false;",
"\tisRewinding = false;",
"\tisFastForward = false;",
"\tisFastRewind = false;",
"\tsliderClockEnabled = false;",
"",
"\tfraction = fraction_changed = 0.0;",
"\tsecondsElapsed = 0.0;",
"\tstartTime = startTime_changed = timeStamp;",
"\tstopTime = stopTime_changed = startTime + duration;",
"\tdeactivateButtonColorChanged = deactivateButtonColor;",
"",
"\tif (!arePlaybackButtonsActive)",
"\t\treturn;",
"",
"\tdeactivateLabelColorChanged = deactivateLabelColor;",
"}",
"",
"function setFastRewind(value, timeStamp)",
"{",
"\ttracePrint('setFastRewind(' + value + ')');",
"\tif (!isFastRewind)",
"\t\tfastRewindStart_fraction = fraction;",
"",
"\tisFastRewind = true;",
"\tisPlaying = false;",
"\tisRewinding = false;",
"\tisFastForward = false;",
"\tsliderClockEnabled = false;",
"",
"\tif (fastRewind_level < 1)",
"\t{",
"\t\t++fastRewind_level;",
"\t\tfastRewindCycleInterval = duration / (speedFactor * fastRewind_level);",
"\t}",
"",
"\tif (fraction == 0) //start reached",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged = deactivateLabelColor;",
"\t\treturn;",
"\t}",
"",
"\tfastRewindStartTime = timeStamp;",
"\tfastRewindStopTime = fastRewindStartTime + secondsElapsed / (speedFactor * fastRewind_level);",
"",
"\tstartTime = startTime_changed = fastRewindStopTime;",
"}",
"",
"function setRewind(value, timeStamp)",
"{",
"\ttracePrint('setRewind(' + value + ')');",
"\tif (!isRewinding)",
"\t\trewindStart_fraction = fraction;",
"",
"\tisRewinding = true;",
"\tisPlaying = false;",
"\tisFastForward = false;",
"\tisFastRewind = false;",
"\tsliderClockEnabled = false;",
"",
"\tfastRewind_level = 0;  //reset",
"\trewindCycleInterval = duration;",
"",
"\tif (fraction == 0)  //start reached",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged = deactivateLabelColor;",
"\t\treturn;",
"\t}",
"",
"\trewindStartTime = timeStamp;",
"\trewindStopTime = rewindStartTime + secondsElapsed;",
"",
"\tstartTime = startTime_changed = rewindStopTime;",
"}",
"",
"function setPaused(value, timeStamp)",
"{",
"\ttracePrint('setPaused(' + value + ')');",
"\tif (value == true)",
"\t{",
"\t\tnow = new Date();",
"\t\tpauseTime = now.getTime() / 1000.0;",
"",
"\t\tisFastRewind = false;",
"\t\tisRewinding = false;",
"\t\tisPlaying = false;",
"\t\tisFastForward = false;",
"\t\tsliderClockEnabled = false;",
"\t}",
"}",
"",
"function setPlay(value, timeStamp)",
"{",
"\ttracePrint('setPlay(' + value + ')');",
"\tisPlaying = true;",
"\tisRewinding = false;",
"\tisFastForward = false;",
"\tisFastRewind = false;",
"\tsliderClockEnabled = false;",
"",
"\tfastRewind_level = 0; //reset fast rewind",
"\tforwardCycleInterval = duration;",
"",
"\tif (fraction == 0 || fraction == 1)  //start or restart from beginning",
"\t{",
"\t\tstartTime = startTime_changed = timeStamp;",
"\t\tstopTime = stopTime_changed = startTime + duration;",
"\t}",
"\telse",
"\t{",
"\t\tstartTime = startTime_changed = timeStamp - secondsElapsed;",
"\t\tstopTime = stopTime_changed = startTime + duration;",
"\t}",
"}",
"",
"function setFastForward(value, timeStamp)",
"{",
"\ttracePrint('setFastForward(' + value + ')');",
"\tisFastForward = true;",
"\tisPlaying = false;",
"\tisRewinding = false;",
"\tisFastRewind = false;",
"\tsliderClockEnabled = false;",
"",
"\tif (fastForward_level < 1)",
"\t{",
"\t\t++fastForward_level;",
"\t\tfastForwardCycleInterval = duration / (speedFactor * fastForward_level);",
"\t}",
"",
"\tfastForwardStartTime = timeStamp - secondsElapsed / (speedFactor * fastForward_level);",
"\tfastForwardStopTime = fastForwardStartTime + duration / (speedFactor * fastForward_level);",
"",
"\tstartTime = startTime_changed = fastForwardStartTime;",
"}",
"",
"function setResetToEnd(value, timeStamp)",
"{",
"\ttracePrint('setResetToEnd(' + value + ')');",
"\tisResetToEnd = true;",
"",
"\t//Stop all clocks",
"\tisPlaying = false;",
"\tisRewinding = false;",
"\tisFastForward = false;",
"\tisFastRewind = false;",
"\tsliderClockEnabled = false;",
"",
"\tfraction = fraction_changed = 1.0;",
"\tsecondsElapsed = duration;",
"",
"\tstopTime = stopTime_changed = timeStamp;",
"\tstartTime = startTime_changed = stopTime - duration;",
"\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\tdeactivateLabelColorChanged = deactivateLabelColor;",
"}",
"",
"function setFraction(value, timeStamp)",
"{",
"\tif (isRewinding || isFastForward || isFastRewind || sliderClockEnabled || sliderDragArmed)",
"        {",
"//              tracePrint('setFraction immediate return..');",
"\t\treturn;",
"        }",
"//\ttracePrint('setFraction(' + value + ')');",
"",
"\tif (isResetToStart)",
"\t{",
"                tracePrint('setFraction isResetToStart=true, reset..');",
"\t\tisResetToStart = false; //reset",
"\t\treturn;",
"\t}",
"\telse if (isResetToEnd)",
"\t{",
"                tracePrint('setFraction isResetToEnd=true, reset..');",
"\t\tisResetToEnd = false; //reset",
"\t\treturn;",
"\t}",
"",
"\tfraction = fraction_changed = value;",
"        tracePrint('fraction_changed=' + fraction_changed);",
"",
"\tif (fraction >= 1) //end reached",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged = deactivateLabelColor;",
"\t\tfraction = fraction_changed = 1.0;",
"\t}",
"}",
"",
"function setFastForwardFraction(value, timeStamp)",
"{",
"\ttracePrint('setFastForwardFraction(' + value + ')');",
"\tif (isPlaying || isFastRewind || isRewinding || sliderClockEnabled || sliderDragArmed)",
"\t\treturn;",
"",
"\tif (isResetToStart)",
"\t{",
"\t\tisResetToStart = false; //reset",
"\t\treturn;",
"\t}",
"\telse if (isResetToEnd)",
"\t{",
"\t\tisResetToEnd = false; //reset",
"\t\treturn;",
"\t}",
"",
"\tfraction = fraction_changed = value;",
"",
"\tif (fraction >= 1) //end reached",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged = deactivateLabelColor;",
"\t\tisFastForward = false;",
"\t\tfraction = fraction_changed = 1.0;",
"\t\tsecondsElapsed = duration;",
"\t}",
"}",
"",
"function setRewindFraction(value, timeStamp)",
"{",
"\ttracePrint('setRewindFraction(' + value + ')');",
"\tif (isPlaying || isFastForward || isFastRewind || sliderClockEnabled || sliderDragArmed)",
"\t\treturn;",
"",
"\tif (isResetToStart)",
"\t{",
"\t\tisResetToStart = false; //reset",
"\t\treturn;",
"\t}",
"\telse if (isResetToEnd)",
"\t{",
"\t\tisResetToEnd = false; //reset",
"\t\treturn;",
"\t}",
"",
"\tfraction = fraction_changed = 1 - value - (1 - rewindStart_fraction);",
"",
"\tif (fraction <= 0.0000001) //start reached - rounded off",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged  = deactivateLabelColor;",
"\t\tisRewinding = false;",
"\t\tfraction = fraction_changed = 0.0;",
"\t\tsecondsElapsed = 0.0;",
"\t}",
"}",
"",
"function setFastRewindFraction(value, timeStamp)",
"{",
"\ttracePrint('setFastRewindFraction(' + value + ')');",
"\tif (isPlaying || isFastForward || isRewinding || sliderClockEnabled || sliderDragArmed)",
"\t\treturn;",
"",
"\tif (isResetToStart)",
"\t{",
"\t\tisResetToStart = false; //reset",
"\t\treturn;",
"\t}",
"\telse if (isResetToEnd)",
"\t{",
"\t\tisResetToEnd = false; //reset",
"\t\treturn;",
"\t}",
"",
"\tfraction = fraction_changed = 1 - value - (1 - fastRewindStart_fraction);",
"",
"\tif (fraction <= 0.0000001) //start reached - rounded off",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged  = deactivateLabelColor;",
"\t\tisFastRewind = false;",
"\t\tfraction = fraction_changed = 0.0;",
"\t\tfastRewindStart_fraction = -1; //reset",
"\t\tsecondsElapsed = 0.0;",
"\t}",
"}",
"",
"function setTime(value, timeStamp)",
"{",
"\t// Check if pause option is selected",
"\tif (!isPlaying && !isRewinding && !isFastForward && !isFastRewind && !sliderClockEnabled)",
"        {",
"                tracePrint('setTime(' + value + ') immediate return');",
"\t\treturn;",
"        }",
"\ttracePrint('setTime(' + value + ')');",
"",
"\ttime = time_changed = value; // time_changed is output event via IS/connect",
"\tsecondsElapsed = Math.abs(value - startTime);",
"        tracePrint ('time=' + time + ', secondsElapsed=' + secondsElapsed);",
"\tif (isFastRewind)",
"\t\tsecondsElapsed = secondsElapsed * (speedFactor * fastRewind_level);",
"\telse if (isFastForward)",
"\t\tsecondsElapsed = secondsElapsed * (speedFactor * fastForward_level);",
"\tif (fraction == 0)",
"\t\tsecondsElapsed = 0.0;",
"\telse if (fraction == 1)",
"\t\tsecondsElapsed = duration;",
"}",
"",
"function setSliderDragged(value, timeStamp)",
"{",
"\tif (value == true) //Drag started",
"\t{",
"                tracePrint ('Drag started');",
"\t\tpreDrag_fraction = fraction;",
"\t\tsliderDragArmed = true;",
"",
"\t\tisPlaying = false;",
"\t\tisRewinding = false;",
"\t\tisFastForward = false;",
"\t\tisFastRewind = false;",
"\t\tsliderClockEnabled = false;",
"\t}",
"\telse //Drag finished",
"\t{",
"                tracePrint ('Drag finished');",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged  = deactivateLabelColor;",
"\t\tsliderDragArmed = false;",
"",
"\t\tsecondsElapsed = duration * fraction;",
"",
"\t\tsliderClockEnabled = true;",
"\t\tif (fraction == 0 || fraction == 1) //start or end reached",
"\t\t\treturn;",
"",
"\t\tsliderClockCycleInterval = duration;",
"\t\tif (fraction >= preDrag_fraction) //play",
"\t\t{",
"\t\t\tdrag_forward = true;",
"\t\t\tdrag_backward = false;",
"\t\t\tsliderClockStartTime = timeStamp - secondsElapsed;",
"\t\t\tsliderClockStopTime = sliderClockStartTime + duration;",
"\t\t\tstartTime = startTime_changed = sliderClockStartTime;",
"\t\t\tplayButtonActivateColorChanged = activateButtonColor;",
"\t\t\tplayLabelActivateColorChanged  = activateLabelColor;",
"\t\t}",
"\t\telse if (fraction < preDrag_fraction) //rewind",
"\t\t{",
"\t\t\tdrag_forward = false;",
"\t\t\tdrag_backward = true;",
"\t\t\tsliderClockStartTime = timeStamp;",
"\t\t\tsliderClockStopTime = timeStamp + secondsElapsed;",
"\t\t\tstartTime = startTime_changed = sliderClockStopTime;",
"\t\t\trewindButtonActivateColorChanged = activateButtonColor;",
"\t\t\trewindLabelActivateColorChanged  = activateLabelColor;",
"\t}",
"",
"\t\tsliderClockStart_fraction = fraction;",
"\t}",
"}",
"",
"function setSliderDragFraction(value, timeStamp)",
"{",
"\tif (isPlaying || isRewinding || isFastForward || isFastRewind || sliderClockEnabled)",
"        {",
"//              tracePrint('setSliderDragFraction immediate return');",
"\t\treturn;",
"        }",
"\ttracePrint('setSliderDragFraction(' + value + ')');",
"",
"\tif (sliderDragArmed)",
"\t\tfraction = fraction_changed = value;",
"}",
"",
"function setSliderClockFraction(value, timeStamp)",
"{",
"\tif (isPlaying || isRewinding || isFastForward || isFastRewind)",
"        {",
"//              tracePrint('setSliderClockFraction immediate return');",
"\t\treturn;",
"        }",
"\ttracePrint('setSliderClockFraction(' + value + ')');",
"",
"\tif (isResetToStart)",
"\t{",
"\t\tisResetToStart = false; //reset",
"\t\treturn;",
"\t}",
"\telse if (isResetToEnd)",
"\t{",
"\t\tisResetToEnd = false; //reset",
"\t\treturn;",
"\t}",
"",
"\tif (drag_forward)",
"\t\tfraction = fraction_changed = value;",
"\telse if (drag_backward)",
"\t\tfraction = fraction_changed = 1 - value - (1 - sliderClockStart_fraction);",
"",
"\tif (fraction <= 0.0000001)",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged  = deactivateLabelColor;",
"\t\tsliderClockEnabled = false;",
"\t\tfraction = fraction_changed = 0.0;",
"\t\tsecondsElapsed = 0.0;",
"\t}",
"\telse if (fraction >= 1)",
"\t{",
"\t\tdeactivateButtonColorChanged = deactivateButtonColor;",
"\t\tdeactivateLabelColorChanged  = deactivateLabelColor;",
"\t\tsliderClockEnabled = false;",
"\t\tfraction = fraction_changed = 1.0;",
"\t\tsecondsElapsed = duration;",
"\t}",
"}",
"",
""
]
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"arePlaybackButtonsActive",
                              "@fromNode":"DISModeScript",
                              "@toField":"setarePlaybackButtonsActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          {
                            "#comment":"TODO use or remove <ROUTE fromField='arePlaybackButtonsActive' fromNode='DISModeScript' toField='setDragEnabled' toNode='Slider'/>"
                          },
                          { "ROUTE":
                            {
                              "@fromField":"resetToStartChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setResetToStart",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastRewindChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setFastRewind",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setRewind",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"pauseChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setPaused",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"playChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setPlay",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastForwardChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setFastForward",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"resetToEndChanged",
                              "@fromNode":"PlaybackControlScript",
                              "@toField":"setResetToEnd",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isActive",
                              "@fromNode":"ForwardClock",
                              "@toField":"setIsClockActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"ForwardClock",
                              "@toField":"setFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"time",
                              "@fromNode":"ForwardClock",
                              "@toField":"setTime",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isActive",
                              "@fromNode":"RewindClock",
                              "@toField":"setIsClockActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"RewindClock",
                              "@toField":"setRewindFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"time",
                              "@fromNode":"RewindClock",
                              "@toField":"setTime",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isActive",
                              "@fromNode":"FastForwardClock",
                              "@toField":"setIsClockActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"FastForwardClock",
                              "@toField":"setFastForwardFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"time",
                              "@fromNode":"FastForwardClock",
                              "@toField":"setTime",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isActive",
                              "@fromNode":"FastRewindClock",
                              "@toField":"setIsClockActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"FastRewindClock",
                              "@toField":"setFastRewindFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"time",
                              "@fromNode":"FastRewindClock",
                              "@toField":"setTime",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isActive",
                              "@fromNode":"SliderClock",
                              "@toField":"setIsClockActive",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"SliderClock",
                              "@toField":"setSliderClockFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"time",
                              "@fromNode":"SliderClock",
                              "@toField":"setTime",
                              "@toNode":"ClockScript"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isPlaying",
                              "@fromNode":"ClockScript",
                              "@toField":"set_enabled",
                              "@toNode":"ForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isRewinding",
                              "@fromNode":"ClockScript",
                              "@toField":"set_enabled",
                              "@toNode":"RewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isFastForward",
                              "@fromNode":"ClockScript",
                              "@toField":"set_enabled",
                              "@toNode":"FastForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"isFastRewind",
                              "@fromNode":"ClockScript",
                              "@toField":"set_enabled",
                              "@toNode":"FastRewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"sliderClockEnabled",
                              "@fromNode":"ClockScript",
                              "@toField":"set_enabled",
                              "@toNode":"SliderClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"forwardCycleInterval",
                              "@fromNode":"ClockScript",
                              "@toField":"set_cycleInterval",
                              "@toNode":"ForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindCycleInterval",
                              "@fromNode":"ClockScript",
                              "@toField":"set_cycleInterval",
                              "@toNode":"RewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastForwardCycleInterval",
                              "@fromNode":"ClockScript",
                              "@toField":"set_cycleInterval",
                              "@toNode":"FastForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastRewindCycleInterval",
                              "@fromNode":"ClockScript",
                              "@toField":"set_cycleInterval",
                              "@toNode":"FastRewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"sliderClockCycleInterval",
                              "@fromNode":"ClockScript",
                              "@toField":"set_cycleInterval",
                              "@toNode":"SliderClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"startTime_changed",
                              "@fromNode":"ClockScript",
                              "@toField":"set_startTime",
                              "@toNode":"ForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"stopTime_changed",
                              "@fromNode":"ClockScript",
                              "@toField":"set_stopTime",
                              "@toNode":"ForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindStartTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_startTime",
                              "@toNode":"RewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindStopTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_stopTime",
                              "@toNode":"RewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastForwardStartTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_startTime",
                              "@toNode":"FastForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastForwardStopTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_stopTime",
                              "@toNode":"FastForwardClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastRewindStartTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_startTime",
                              "@toNode":"FastRewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fastRewindStopTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_stopTime",
                              "@toNode":"FastRewindClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"sliderClockStartTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_startTime",
                              "@toNode":"SliderClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"sliderClockStopTime",
                              "@fromNode":"ClockScript",
                              "@toField":"set_stopTime",
                              "@toNode":"SliderClock"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"ClockScript",
                              "@toField":"setValue",
                              "@toNode":"Slider"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"ResetToStartButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"ResetToStartLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"FastRewindButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"FastRewindLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"RewindButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"RewindLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PauseButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PauseLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PlayButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PlayLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"FastForwardButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"FastForwardLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateButtonColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"ResetToEndButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"deactivateLabelColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"ResetToEndLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"playButtonActivateColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PlayButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"playLabelActivateColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"PlayLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindButtonActivateColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"RewindButtonMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"rewindLabelActivateColorChanged",
                              "@fromNode":"ClockScript",
                              "@toField":"diffuseColor",
                              "@toNode":"RewindLabelMaterial"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"valueChanged",
                              "@fromNode":"Slider",
                              "@toField":"setSliderDragFraction",
                              "@toNode":"ClockScript"
                            }
                          },
                          {
                            "#comment":"fix or omit <ROUTE fromField='isDragged' fromNode='Slider' toField='setSliderDragged' toNode='ClockScript'/>"
                          },
                          { "ROUTE":
                            {
                              "@fromField":"secondsElapsed",
                              "@fromNode":"ClockScript",
                              "@toField":"setSecondsElapsed",
                              "@toNode":"TimeScaleScript"
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          {
            "#comment":"===================="
          },
          { "Anchor":
            {
              "@description":"DvdController Example",
              "@url":["DvdControllerExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerExample.x3d","DvdControllerExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerExample.wrl"],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,1,1],
                                "@emissiveColor":[0,1,1]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Text":
                        {
                          "@string":["DvdControllerPrototype","is a Prototype definition file.","To see an example scene","select this text and view","DvdControllerExample"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@justify":["MIDDLE","MIDDLE"],
                                "@size":0.8
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          }
        ]
    }
  }
}