This is a must for all VRML2.0 compliant files. The appearance field contains an Appearance node which in turn has a field material. This field in turn contains a Material node. To change the cube's color the appearance field has to be in front of the geometry field. Then a diffuseColor field will tell the browser to render the sphere in a certain color.
Every color is represented by a mixture of red, green and blue color percentages.
If you want to move it you have to place the Shape node into a Transform node and translate the Shape node where you want it to be. Here are the final source code and the final image. This eventOut time could be used to trigger other events. The TouchSensor is used as a child of the triggering parent node. When the parent node is touched, the TouchSensor will generate an eventOut to trigger other event.