• I am trying to create an auto tour but am running into some trouble. I currently have the following code from


    <krpano version="1.0.8" onstart="action(check-auto-tour);">

    <action name="check-auto-tour">
    if(autotour-button.enabled == true, action(play-tour); autotour-button.enabled == false, action(dont-play-tour); );"
    </action>

    <action name="play-tour">
    lookto(180,0,120,smooth(100,50,20));
    lookto(360,0,300,smooth(100,50,20));
    wait(1);
    loadpano(oaktrail.xml,null,MERGE,BLEND(1));
    </action>

    <action name="dont-play-tour">
    set(autorotate.enabled,false);
    </action>

    <plugin name="autotour-button" enabled="true" visible="true" handcursor="true" keep="true" url="averyisland_click.jpg" zorder="2" align="bottom" edge="center" y="309" x="240" blendmode="screen" onover="set(blendmode,add);" onout="set(blendmode,screen);" onhover="showtext(Auto tour on / off)" onclick="action(play-tour);" />

    <plugin name="stop_autotour-button" enabled="true" visible="false" handcursor="true" keep="true" url="averyisland_click.jpg" zorder="2" align="bottom" edge="center" y="309" x="240" blendmode="screen" onover="set(blendmode,add);" onout="set(blendmode,screen);" onhover="showtext(Auto tour on / off)" onclick="action(dont-play-tour);" />

    <action name="auto-tour_on">
    set(plugin[autotour-button].enable,false);
    set(plugin[autotour-button].visible,false);
    set(plugin[stop_autotour-button].enable,true);
    set(plugin[stop_autotour-button].visible,true);
    </action>

    <action name="auto-tour_off">
    set(plugin[stop_autotour-buttont].enable,false);
    set(plugin[stop_autotour-button].visible,false);
    set(plugin[autotour-button].enable,true);
    set(plugin[autotour-button].visible,true);
    </action>

    However when this loads the new scene it does not continue into auto tour. So what i did was create a set of xml codes for all other scenes that load the play-tour action on start when the auto tour action is enabled. If a user wants manuel tour they continue through the tour using hotspots or thumbnails depending on which one I use.


    <krpano version="1.0.8" onstart="action(play-tour);">


    <action name="play-tour">
    lookto(180,0,120,smooth(100,50,20));
    lookto(360,0,300,smooth(100,50,20));
    wait(3);
    loadpano(bridge.xml,null,MERGE,BLEND(1));
    </action>


    But in this case the auto-tour does not allow users to interrupt it. It completes the action and loads the next scene. How can I allow users to interrupt the auto tour and see what they want and then let the auto tour continue?


    Thanks in advance for your help

  • Hi,


    that's correct because you load the next pano and stop with moves..

    this.. (numbered xml's are different pano's..)


    <action name="play-tour">
    action(startloading);
    action(load1);

    looktot(0,0,40,0);
    oninterrupt( action(lookinterrupt) );
    wait(3);
    lookto(180,0,120,smooth(100,50,20));
    lookto(360,0,300,smooth(100,50,20));
    wait(1);

    loadpano(oaktrail.xml,null,MERGE,BLEND(1));
    lookat(0,0,40,0);
    wait (load);
    wait(blend);

    lookto(-187,0,50, smooth(25,25,25));
    lookto(220,-10,20);

    action(load5)
    wait (load);
    wait(blend);
    wait(10);
    load(14);

    </action>


    <action name="lookinterrupt">
    action(loadingdone);
    breakall();
    </action>

    So , you make a chain from moves and actions, and you can interrupt..
    but to continue ... i never did that...it's on the forum..i'm sure!

    let me know if that works..


    Goodluck

    Tuur *thumbsup*

  • Thanks It works perfectly. *thumbsup*


    The only problem now is that I want it to change images when auto-tour is turned on. But it remains the same even with the action to change it from the code above.

  • so it loads
    loadpano(oaktrail.xml,null,MERGE,BLEND(1));

    ?? but not the next one? as you do

    ...
    ...

    loadpano(sequoiapath.xml,null,MERGE,BLEND(1));

    ...
    ..

    ???

    Do you have it online somewhere?

    Tuur *thumbsup*

  • Quote

    One problem with having it all load in the same xml is that when it is interrupted after a scene is loaded it starts the action from the beginning.

    yes, but i don't have experience with it making it to continue..

    have a look on the forum .. it's there somewhere..

    http://www.krpano.com/forum/wbb/inde…totour#post8359

    http://www.krpano.com/forum/wbb/inde…hlight=autotour

    Cheers
    Tuur *thumbsup*

Participate now!

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