The Date Range Trigger component changes a true/false variable to true when within the date range and back to false when out of range.
This example is used to show a winter panorama during the 21st November till the 20th March at which point it will change back to summer.
Date Range Trigger example
Change your system clock to within the above date range and refresh the browser to see the switch.
To add the component to Pano2VR, download the Date Range Trigger component.
Once downloaded double click the component to add to Pano2VR.
Pano2VR will open asking which category you should save the component to, the default is User Defined but you can define your own.
To add the component to your skin, select the category you saved the Date Range Trigger component to, then double click the component.
The date range is set using the skin configuration button.
To set the date range, you enter the month then day with no separators, so for example to enter the 21st December to the 20th march, you would enter:
This will set the variable inRange, to true during the date range, so in the above example from the 21st December to the 20th March the variable inRange will be true.
The project uses two actions in the container node_change:
This opens the summer panorama.
Of course the action Variable Changed will trigger anytime the variable changes, so an Action Filter is used to make sure the action is triggered when the variable is false.
The second action is very similar but opens the Winter panorama:
The action filter will only allow the action to be triggered if the variable is true:
The date range can be set to just one day, to do this you would enter the same date in both Range Start and Range End in the skin configuration.
The working project is also attached here:
The component can be used to trigger many things, not just changing nodes, skin colours, change text, popups and so on.
1 post • Page 1 of 1