Please HELP with delayedcall...

  • Hi, I'm making a virtual tour with 7 panos.
    Each pano has its own xml file and on each pano a textfield is shown by tweening its position :

    this code is in the skin.xml file included in each xml pano file :

    and in each xml pano file I call the show_infos action and set the introhtml data :

    Code
    <krpano version="1.0.8.14" onstart="show_infos">
    
    
    <data name="introhtml">
    Bla bla bla pano 1
    </data>

    the problem is that is I load a new pano (so a new xml file calling show_infos onstart) before the delayedcall of the first one is finished the delayedcall value stays for the second one and the close_infos is called then.
    Am I clear ? for exemple I start the tour with pano1.xml, it calls "show_infos()" and after 10 seconds calls "close_infos()", is I load pano2 7 seconds after the first one the "close_infos()" is called 3 seconds after pano2 is loaded instead of 10 seconds...

    Is there a solution ???

    Many many thanx !

  • Hi Jerome,
    you can add the textfield plugin dynamically at start:

    <krpano...onstart="show_infos(nameid)"...>
    <data name="html_nameid"> Bla bla bla pano 1</data>
    </krpano>


    <action name="show_infos">
    txtadd(dataid, 'data:html_', %1);
    addplugin(%1);
    set(plugin[%1]..., ...);
    set(plugin[%1].html, get(dataid));
    ...

    tween(plugin[%1].y,0,2,easeOutQuad);
    delayedcall(10, close_infos(%1));
    </action>

    <action name="close_infos">
    tween(plugin[%1].y,-500,2,easeOutQuad);
    </action>

    Not tested!

Participate now!

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