• Please I made a plugin to look around and load some panos , I just want to know what I have to do to:
    1 when I move the mouse stops this action
    2 if I leave the mouse idle for more than 5 seconds the action begins again.
    Can I make it? Is it possible?
    Thank you everybody

  • Hi,

    yes it's possible. Here is short example code how to do it:

    <krpano version="1.0.8.14" onstart="action(setuptour);>


    <action name="setuptour">
    set(step,1);
    set(idletime,4);
    set(events.onidle,action(autotour) );
    </action>


    <action name="autotour">
    oninterrupt(break);
    if(step == 1, lookto(50,0,90,smooth(3,-3,10)); inc(step); );
    if(step == 2, wait(1); inc(step); );
    if(step == 3, lookto(-30,0,90,smooth(3,-3,10)); inc(step); );
    if(step == 4, wait(1); inc(step); );
    if(step == 5, loadpano(intro1.xml,null,MERGE,BLEND(1)); );

    ...

    if(step == 10, tourdone(); set(step,1); );
    </action>

    So basically onstart it set the action to start the autotour. Idletime is the time tour wait before autotour takes control. When you interfere it with mouse, it will stop but continue from the step it was left. You can modify the steps actions as you wish, example to look on hotspot and then load panorama to go there.

    Hope this helps :)

    Regards,

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!