Hide elements when player is active

Learn to use a logic block to hide elements when the player is active (when interacting with the panorama or skin). You use a timer that has a logic block by default.

  1. Open the Skin Editor.

  2. Add an element. A Text Box, for example.

  3. Select the Timer element in the Toolbar.

  4. In the Canvas, drag around the Text Box. The Text Box will become a child of the Timer.

    Text as a child of a Timer
    Text as a child of a Timer
  5. In the Timer properties, open the Timer panel and select Player inactive for Type.

  6. In the Appearance panel, notice that the arrows next to Visible are orange. This means there is already a Logic Block applied. Click on the orange arrows.

    The Logic Block Settings opens and describes that if the timer is not (Value is false) active (Trigger is Active), the timer (and all of its child elements) won’t be visible. This is an expression with one condition.

    We just need to make one adjustment to the expression. Change the value from false to True. Now it expresses, if the player is inactive (meaning, no user interaction) and therefore the active trigger of the Timer is true, then the Timer and all its children are invisible. Then, after 5 seconds (the timeout set in the Timer properties) the Timer becomes inactive and the Logic Block falls back to the default value of Visible = true.

    Timer hides elements
    Timer hides elements

    Click OK to close the settings.

  7. Use Live View to see it in action. When you spin or interact within the player, the text box will hide and when you stop interacting, the text box will appear again.

  8. Save the skin.


See also