If all HTML View pages match the screen size, the one selected at the time of running or packaging your simulation will be used as default. You can then switch among the views in run time. The command for this is
Each HTMLView has a root node, called Simulation view, from which all other HTML view elements hang as tree nodes. The Simulation view root node has a number of properties that affect this GUI page.
Properties of the Simulation view root node
RunAlways: This property accepts a constant boolean (that is
By default, this value is
InnerHTML: This property accepts a multiline text that will be set as inner HTML for a hidden <div> element of the page.
This, apparently secret, code is a placeholder to define special elements that can be used in other HTML View elements. For instance, this is the place to define SVG filters. As an example, you can include this text to define a radial gradient filter:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <radialGradient id="MyGradient" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:0" /> <stop offset="100%" style="stop-color:rgb(0,0,255);stop-opacity:1" /> </radialGradient> </defs> </svg>
You can later use
OnBlur: This is an Action property that is executed when the HTML page looses focus.
You can use this action, for instance, to stop a sound from playing when the user switches pages.
OnFocus: This is an Action property that is executed when the HTML page gains focus.
You can use this action, for instance, to resume a sound that was playing when the user switched pages.