• Hi, this is my first time posting on this forum regarding Krpano code, please bear with me.

    I've created a virtual tour and have so far successfully edited the XML in my limited knowledge. However I have one issue that I cannot seem to resolve, and it's creating an info pop-up window for an icon that I've placed in the bottom control bar. Can this be done using an onclick=" etc event? I'm also aware that I may need to add actions to this, but that may be over skill level at this stage. :(

    I have also tried the method located in this thread: How to create pop up window using a button?
    However it doesn't seem to apply to my particular usage, since I don't need different popups for each scene, just a general info popup for the whole tour.

    My code is as follows

    Code
    <layer name="info" keep="true" url="info.png" onclick=""  align="leftbottom"  visible="true" x="75" y="3" zorder="10" scale=".65" handcursor="true"/>

    Any help you can provide is much appreciated.

  • If you don't want separate info box for each scene than you followed my wrong code example.

    You would need to add new simple button in your vtourskin next to other buttons defining onclick call to action that will toggle your introimage visibility:

    Code
    <layer name="menu_btn_info" style="skin_glow" url="path/button_image.png" align="rightbottom" x="95" y="4" scale="0.5" onclick="toggle_pano_info_box();" />


    Add your intro layer:

    Code
    <layer name="introimage" keep="true" url="introimage.png" align="center" visible="false" status="closed" />


    add action:

    Code
    <action name="toggle_pano_info_box">
    	  	if(layer[introimage].status EQ closed,
    			set(layer[introimage].status,'open');				
    			set(layer[introimage].visible,true);	
    			,
    			set(layer[introimage].visible,false); 
    			set(layer[introimage].status,'closed');
    			);
    </action>

Participate now!

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