hospots in a upper windows according to an above window

  • in this exemple: http://www.spheerique.com/spheros//visit…l2fenetres.html
    I use 2 windows in a html file:

    <script type="text/javascript">
    // <![CDATA[
    if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
    {
    var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "300", "9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("pano", "testfenetre0bis.xml");
    so.useExpressInstall("swfobject/expressinstall.swf");
    so.setAttribute('xiRedirectUrl', window.location);
    if ( so.write("krpano") ) { var macmousewheel = new SWFMacMouseWheel(so); }
    }
    else
    {
    document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
    }
    // ]]>

    </script>
    <script type="text/javascript">
    // <![CDATA[
    if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
    {
    var so = new SWFObject("krpano.swf", "krpanoSWFObject1", "100%", "500", "9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("pano", "testfenetre2.xml");
    so.useExpressInstall("swfobject/expressinstall.swf");
    so.setAttribute('xiRedirectUrl', window.location);
    if ( so.write("krpano2") ) { var macmousewheel = new SWFMacMouseWheel(so); }
    }
    else
    {
    document.getElementById("krpano2").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
    }
    // ]]>
    </script>

    I want the upper window stay the same, and the hotspots change the above pano. according to the hotspot properties lookat etc....

    tthe code of the hotspot:
    <hotspot name="spot1" hview="-110" vview="0" fovview="90" hcenter="-48.3692" vcenter="14.3706" onclick="set(plugin[data].autorotate,get(autorotate.enabled));set(autorotate.enabled,false);lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100))
    ;loadpano(testfenetre2.xml,null,null,BLEND(1));lookat(get(hview),get(vview),get(fovview));wait(blend);lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));set(autorotate.enabled,get(plugin[data].autorotate));" url="testfenetredata/graphics/spots/spot0.swf" onhover="showtext(Vuye du bas de L'aqueduc de Roquefavour);" ath="311.631" atv="14.3706"/>

    what code do i have to use to make that ???

  • Hi Germain,

    This can be done using JavaScript...
    Add this code to your html:

    Now, you can call the Javascript function TalkTo_KrpanoSWFObject1(arg) from your "up_krpano" (krpanoSWFObject) to execute some action (the args you gives to the function) in your "down_krpano" (krpanoSWFObject1)....
    For example, you can call that function inside the onclick of your hotspot:

    Code
    <hotspot name="spot0" onclick="js(TalkTo_KrpanoSWFObject1(loadpano(PANO_TO_BE_LOADED.xml)));" 
    	url="spot0.swf" onhover="showtext(Vue 360° du Moulin);
    	" ath="280.64" atv="-0.0552995"/>

    SAlut.

  • Michel thank you for your speed, your kindness and your skills, this system suits me better than the iframe window *thumbsup*
    Merci Michel pour ta diligence, ta gentillesse et tes compétences, ce systeme me convient mieux que la fenetre iframe *thumbsup*

  • I want also open a html file
    I try this code but it doesn't work .!!???

    Je veux aussi ouvrir un fichier html
    J'ai utilisé ce code, mais cela ne marche pas!!???

    js(TalkTo_KrpanoSWFObject1(openurl(../tour%20luthier/visiteluthier.html));"

  • Hi Germain,

    I think the problem is a missing parenthesis *wink* ...
    js(TalkTo_KrpanoSWFObject1(openurl(../tour%20luthier/visiteluthier.html)));"

    Also, no need to call the javascript here... just call the openurl() directly...
    openurl(../tour%20luthier/visiteluthier.html);

    SAlut.

  • Thank you Klaus and Michel it was the parentis and also "allow popus on firefox"
    The problem now is that the html page appeérs, but in a full page and not in the above window ???

    Merci Klaus et Michel c'était en effet une histoire de parenthèse, at aussi de ne pas avoir autorisé les popups de firefox.
    A présent le probleme est que je n'ai pas ma page dans la petite fenètre du bas, mais en plein écran! ??????

  • Hi Germain,

    I think you have to use AJAX to be able to change the content of your DIV...
    I have found this as a possible solution: http://www.dhtmlgoodies.com/index.html?page=ajax
    inside this page, look at the Ajax - dynamic content example... Perhaps this can be a way to do...
    Another way would be, instead of doing your different parts using DIVs, rebuild your page using FRAMESETs as your different parts...

    Also, remarks that when you change your DIV content from Krpano to some html, then you can not call Krpano actions as loadpano(X) any more (obvious *rolleyes* )... You will have to know if krpano exist to receive actions, and if not, reload it...

    Anyway, not an impossible thing to do but not simple....

    SAlut.

  • When I open my web page on another computer, it works well.
    But by copying the files, I have the first page that opens with 2 windows, but when I click on the hotspots, pano does not appear in the window below.
    Ditto on all computers (xp and vista) except the principal.

    Quand j'ouvre ma page web sur un autre ordinateur, cela fonctionne bien.
    Mais en copiant les fichiers, j'ai la première page qui s'ouvre avec les 2 fenetres, mais quand je clique le hotspots le pano ne s'affiche pas dans la fenetre inférieure.
    Idem sur tout les ordinateurs (xp et vista) excepté le principal.


    <html>
    <head>
    <title>Visite 2 fenetres</title>
    </head>
    <style>
    body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
    * html, * html body{ overflow: hidden; }
    a{ color:#AAAAAA; text-decoration:underline; }
    a:hover{ color:#FFFFFF; text-decoration:underline; }
    </style>
    <body>

    <div id="krpano" xstyle="float:left;">
    <noscript><table width="100%" height="100%"><tr
    valign="middle"><td><center>ERROR:<br><br>Javascript
    not
    activated<br><br></center></td></tr></table></noscript>
    </div>
    <div id="krpano2" xstyle="float:left;">
    <noscript><table width="100%" height="100%"><tr
    valign="middle"><td><center>ERROR:<br><br>Javascript
    not
    activated<br><br></center></td></tr></table></noscript>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </center>
    <script type="text/javascript" src="swfobject/swfobject.js"></script>
    <script type="text/javascript" src="swfobject/swfmacmousewheel.js"></script>


    <script type="text/javascript">
    // <![CDATA[
    function krpano1()
    {
    return document.getElementById("krpanoSWFObject1");
    }


    function TalkTo_KrpanoSWFObject1(arg)
    {
    krpano1().call(""+ arg +"");
    }

    // ]]>
    </script>

    <script type="text/javascript">
    // <![CDATA[
    if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
    {
    var so = new SWFObject("krpano.swf", "krpanoSWFObject", "100%", "60%", "9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("pano", "minitest2.xml");
    so.useExpressInstall("swfobject/expressinstall.swf");
    so.setAttribute('xiRedirectUrl', window.location);
    if ( so.write("krpano") ) { var macmousewheel = new SWFMacMouseWheel(so); }
    }
    else
    {
    document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
    }
    // ]]>

    </script>
    <script type="text/javascript">
    // <![CDATA[
    if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
    {
    var so = new SWFObject("krpano.swf", "krpanoSWFObject1", "100%", "40%", "9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("pano", "minitest0.xml");
    so.useExpressInstall("swfobject/expressinstall.swf");
    so.setAttribute('xiRedirectUrl', window.location);
    if ( so.write("krpano2") ) { var macmousewheel = new SWFMacMouseWheel(so); }
    }
    else
    {
    document.getElementById("krpano2").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
    }
    // ]]>
    </script>
    </body></html>

    hotspot:

    <hotspot name="spot0" hview="100" vview="90" fovview="20" hcenter="160" vcenter="0"
    onclick="lookto(get(hcenter),get(vcenter),get(view.fovmin),smooth(400,20,100));
    js(TalkTo_KrpanoSWFObject1(loadpano(minitest5.xml,null,null,BLEND(1))));"
    url="minitestdata/graphics/spots/spot0.swf" onhover="showtext(Notre Dame de la garde);" ath="513" atv="-1.5"/>

Participate now!

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