Hi!
one more code for extend krpano functionality, you can start any count of timers.
The "Timer" :)
usage:
include timer.xml to your tour
start timer - timer.start(name,delay,actions);
Where
name - is the custom timer name any you want, "mytimer" for example.
delay - timer period delay in seconds
actions - any krpano actions,optional
when timer starts, event with same name will be available
for example
<events mytimer="actions"/>
you can use any count of event call using named events and keep = true / false
for stop timer use timer.stop(name);
name - is the custom started timer name
timer_name.reset(); - reset delay of timer, for example if you need to restart timer period.
reset() will set enabled to true also.
you can change delay in runtime, simple set delay value
for example set(timer_name.delay,10); will change timer delay to 10 seconds
for pause executing timer use
set(timer_name.enabled,false); or timer_name.pause();
resume executing
set(timer_name.enabled,true); or timer_name.resume();
EXAMPLE:
timer.start(mytimer1,10,trace(10 seconds)); - will trace text "10 seconds" every 10 seconds.
same but using events
timer.start(mytimer1,10);
<events mytimer1="trace(10 seconds)"/>
Hope you like it