minimise map 5 seconds after pano starts - text not displaying long enough when clicked on map

  • I have tried to minimize the map 5 seconds after it has started, without success.

    I have tried using:

    delayedcall(5, action(closemap);

    The start of my XML file looks like:


    <krpano version="1.0.8 "logkey="false" onstart="action(start);" >
    <!--************** KrPano plugins and datas ***************************************************-->


    <!-- text styles for startup info -->
    <textstyle name="infostyle" origin="top" edge="top" yoffset="10" textalign="center" background="false" border="false" fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="1.0" fadetime="1.0" />

    <!--************** Open the first pano ********************************************************-->


    <!-- start - load first scene -->
    <action name="start">
    loadscene(scene1, null, MERGE);
    delayedcall(5, action(closemap);
    </action>

    <plugin name="introimage" keep="true"
    url="introimage.png"
    align="center"
    zorder="1"
    onloaded="set(alpha,0); tween(alpha,1.0);"
    onclick="hideintroimage();"
    />


    <action name="hideintroimage">
    if(plugin[introimage].enabled,
    set(plugin[introimage].enabled,false);
    closemap();
    tween(plugin[introimage].alpha, 0.0, 0.5, default, removeplugin(introimage));
    );
    </action>


    <contextmenu>
    <item name="site_link"
    caption="Created by http://www.dpinparis.com ...."
    onclick="openurl(http://www.dpinparis.com/)" />
    </contextmenu>

    The closemap action looks like;
    <!-- actions -->
    <action name="closemap">
    set(onclick,action(openmap););
    tween(width,45,distance(300,0.5),easeoutquad);
    tween(height,45,distance(300,0.5),easeoutquad);
    </action>

    Any ideas?
    ALso, if I click on a hotspot t open a new pano, the text appears for x number of seconds that I choose. If I click on the map tp open the pano, the text just flashes. I find this strange as I thought that I load the scenes in the same way:

    hotspot load scene:

    onclick="loadscene(scene4, null, MERGE, BLEND(1));"

    map load scene:
    onclick="loadscene(scene4, null, MERGE, BLEND(1));"

    start scen action

    <action name="startscene">
    showtext(La Cave Bar Mosaique, infostyle);
    action(activatespot,scene4, 20);
    </action>

    Any ideas?

    Thanks in advance.

  • ok, so now I have the following, which still does not work. I know the delayedcall does do something after 5 seconds, as when I enter an error the console pops up. as it is below, nothing happens. Any ideas?

    Thanks,


    <!-- start - load first scene -->
    <action name="start">
    loadscene(scene1, null, MERGE);
    delayedcall(5, action(closemap));
    </action>

    <action name="closemap">
    set(onclick,action(openmap););
    tween(width,45,distance(300,0.5),easeoutquad);
    tween(height,45,distance(300,0.5),easeoutquad);
    </action>

  • it is ok, i fixed it. I added it to the plugin creation.

    #<plugin name="map" url="plan.png" keep="true"
    align="righttop" x="16" y="16" alpha="0.85" handcursor="false"
    scalechildren="true"
    width="300"
    height="300"
    onloaded="delayedcall(5, action(closemap));"

    />

  • Hi,

    right, this works too,
    in the other case (calling the action not direct from the plugin itself) you need to add the 'plugin[name].' in front of the variables,

    e.g.

    Code
    <action name="start">
     loadscene(scene1, null, MERGE);
     delayedcall(5, action(closemap));
     </action>
     
     <action name="closemap">
     set(plugin[map].onclick,action(openmap););
     tween(plugin[map].width,45,distance(300,0.5),easeoutquad);
     tween(plugin[map].height,45,distance(300,0.5),easeoutquad);
     </action>

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!