Auto showing and hiding title text box
Posted: Mon Jun 12, 2017 9:16 pm
Hi,
I was asked about this through support e-mail and thought others would like to see how I would do this.
The task is to have a title text box that hides after so many seconds, in this example 4.
The text box is visible on open but hides after 4 seconds.
As you change nodes it shows again then hides again after the 4 seconds.
So how does it work, each pano has a title as set in the user data panel.
In the skin is a text box with the place holder $ut to display the title text.
The text box has a timer wrapped around it set for 4 second timeout, type init and repeat one time.
The timer then has the actions: Deactivate, Change Element Position: X:0/Y:-70, $self
And Activate, Change Element Position X: 0/Y: 0, $self.
The point hotspot has the action to set a value to the timer, 4 seconds.
So what will happen is when the project opens the timer starts, when it reaches 4 seconds it will stop so it deactivates and in so doing the action will move the position to -70px in the Y direction, minus means it will go up.
When you click the hotspot you set a vale of 4 to the timer, so 4 seconds, the timer becomes active, the action when active change position to Y: 0 so it moves down to its starting position. When the timer reaches 4 the timer deactivates and so it will changing position to -70 again.
Simple but effective.
Mods, you can change the action from change to set position when active so the text box it does not slide into view.
You can change the timer in the hotspot template to say 2 seconds, so after the first 4 seconds the others close after 2.
Regards,
Hopki
I was asked about this through support e-mail and thought others would like to see how I would do this.
The task is to have a title text box that hides after so many seconds, in this example 4.
The text box is visible on open but hides after 4 seconds.
As you change nodes it shows again then hides again after the 4 seconds.
So how does it work, each pano has a title as set in the user data panel.
In the skin is a text box with the place holder $ut to display the title text.
The text box has a timer wrapped around it set for 4 second timeout, type init and repeat one time.
The timer then has the actions: Deactivate, Change Element Position: X:0/Y:-70, $self
And Activate, Change Element Position X: 0/Y: 0, $self.
The point hotspot has the action to set a value to the timer, 4 seconds.
So what will happen is when the project opens the timer starts, when it reaches 4 seconds it will stop so it deactivates and in so doing the action will move the position to -70px in the Y direction, minus means it will go up.
When you click the hotspot you set a vale of 4 to the timer, so 4 seconds, the timer becomes active, the action when active change position to Y: 0 so it moves down to its starting position. When the timer reaches 4 the timer deactivates and so it will changing position to -70 again.
Simple but effective.
Mods, you can change the action from change to set position when active so the text box it does not slide into view.
You can change the timer in the hotspot template to say 2 seconds, so after the first 4 seconds the others close after 2.
Regards,
Hopki