Problems with my first Autotour

  • Please excuse my total lack of coding knowledge! Total Newbie!


    I'm attempting to compile a simple Autotour which will autorate for a specified time then move to next pano and continue. Using the oninterrupt function, I'm trying to break out of the autotour and allow actions to take place. After a set time period, onidle should activate the autotour action again. Well thats the plan!


    With the code I'm having the following problem;


    When oninterrupt is called - tour moves to manualtour action, but remains. The onidle event doesn't seem to call the autotour action. I suspect I've missed something basic here! Any help or pointer would be great.


    Many thanks to all the contributors on the site, for your valuable guidance in getting me here!


    Graham


    PS - Sorry if I've posted this incorrectly.


    <krpano version="1.0.8.14" actionintervalbase="timer" onstart="setuptour(); set(view.fov,90); set(view.hlookat,0); set(view.vlookat,0); set(view.fovtype,MFOV);" >
    <action name="setuptour">
    set(step,1);
    set(idletime,4);
    set(events.onidle, autotour() );
    </action>


    <action name="manualtour">
    set(plugin[in].visible,true);
    set(plugin[out].visible,true);
    set(plugin[right].visible,true);
    set(plugin[left].visible,true);
    set(plugin[up].visible,true);
    set(plugin[down].visible,true);
    set(idletime,4);
    set(events.onidle, autotour() );

    </action>


    <action name="autotour">
    oninterrupt(manualtour);
    set(plugin[in].visible,false);
    set(plugin[out].visible,false);
    set(plugin[right].visible,false);
    set(plugin[left].visible,false);
    set(plugin[up].visible,false);
    set(plugin[down].visible,false);

    if(step == 1, wait(20); inc(step); );
    if(step == 2, loadpano(virtualtour1.xml,NULL,KEEPBASE|NOPREVIEW,BLEND(1)); wait(20); inc(step); );
    if(step == 3, loadpano(virtualtour2.xml,NULL,KEEPBASE|NOPREVIEW,BLEND(1)); wait(20); inc(step); );
    if(step == 4, loadpano(virtualtour0.xml,NULL,KEEPBASE|NOPREVIEW,BLEND(1)); wait(20); inc(step); );
    if(step == 5, loadpano(virtualtour1.xml,NULL,KEEPBASE|NOPREVIEW,BLEND(1)); wait(20); set(step,2); );

    </action>

    <include url="virtualtour0.xml"/>
    <autorotate enabled="true" waittime="3" speed="5"/>

  • Many thanks Klaus for your reply.

    I've uploaded the autotour onto the server and it can be viewed here;

    http://burghmuir.com/autotour/index.html

    The xml is on this link;
    http://burghmuir.com/autotour/virtualtour.xml

    As I mentioned last night, I just cannot find where my fault is. It appears to stop at the manualtour action, and the events.onidle call doesn't appear to work.

    Any help will be greatfully appreciated.

    Many thanks
    and Best Regards
    Graham

  • l have looked through the code again and found a few elementary mistakes ( inc(step,..); fixed to inc(step,..); ); ), and at least now it cycles through the various tours ok. However, I seem still to have this problem where after the oninterrupt call is triggered, the manualtour action is triggered, but just remains there, despite the set(events.onidle) not moving the tour back to the autotour action.


    A real puzzle for me, just cannot get me head to identify the solution. Any help or guidance would be greatfully appreciated.


    [UPDATE} Think I've found the problem (so basic!). I'm away to correct it just now.


    Graham

    Edited once, last by Gra1252 (September 29, 2011 at 4:57 PM).

Participate now!

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