Problem with Info Button when changing pano.

  • Info Button, on multilanguage interface, doesn't reset when changing pano.
    Also a problem with krprotect: it doesn't recognize the pano XMLs. May be a problem with the action Loadpano.

    Here's the code.
    The Global XML contain:

    - an Info button;

    Code
    <plugin name="info" parent="controlbar" keep="true" zorder="3" align="bottom" x="+240"  y="5" style="options"  crop=  "80|0|10|20" onovercrop=  "80|20|10|20" ondowncrop=  "80|40|10|20" onhover="showtext(get(infoon));" onclick="action(infoenon);" />

    - an Action to switch the info pane, depending on the used language;

    - an Action to reset the info buton;

    Code
    <action name="resetinfo">
    
    
            if(plugin[usa] === visible, action(infoenoff));
            if(plugin[italy] === visible, action(infoitoff));
            if(plugin[germany] === visible, action(infodeoff));
    
    
        </action>

    - and Actions to change Panoramas;

    Each Pano XML contains the three images, that is one image per language:

    Code
    <plugin name="infoit" keep="false" parent="" zorder="" alpha="1.0" align="center" url="info/infoitanticamera.png" onhover="showtext(get(infooff));" onclick="action(infoitoff);" visible="false" />
    	<plugin name="infoen" keep="false" parent="" zorder="" alpha="1.0" align="center" url="info/infoenlobby.png"      onhover="showtext(get(infooff));" onclick="action(infoenoff);" visible="false" />
    	<plugin name="infode" keep="false" parent="" zorder="" alpha="1.0" align="center" url="info/infoenlobby.png"      onhover="showtext(get(infooff));" onclick="action(infodeoff);" visible="false" />


    Where are the errors?

    Thanks in advance,
    Marco

  • I changed the action to reset info button with the following code and now it's working:

    Code
    <action name="resetinfo">
    
    
            if(plugin[usa].visible, action(infoenoff));
            if(plugin[italy].visible, action(infoitoff));
            if(plugin[germany].visible, action(infodeoff));
    
    
        </action>

    Old code was:

    Code
    <action name="resetinfo">
    
    
            if(plugin[usa] === visible, action(infoenoff));
            if(plugin[italy] === visible, action(infoitoff));
            if(plugin[germany] === visible, action(infodeoff));
    
    
        </action>

    Please, can someone tell me why? Isn't the correct form the second one?
    Thanks,

    Marco

  • <action name="resetinfo">

    if(plugin[usa] === visible, action(infoenoff));
    if(plugin[italy] === visible, action(infoitoff));
    if(plugin[germany] === visible, action(infodeoff));

    </action>

    i think the correct code should have been

    if(plugin[usa].visible == false, action(infoenoff));
    if(plugin[italy].visible == false, action(infoitoff));
    if(plugin[germany].visible == false, action(infodeoff));

Participate now!

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