How to use javascript to switch the embeded krpano?

  • Hi Experts overhere, *smile*

    I need your help. I don't know how to use javascript to switch the embeded krpano?


    Let see my case (http://www.minkeystudio.com/krpano/) *g*

    Firstly, I try to explain my situation, I just use the following script to embed the krpano into my website.

    <script src="vr1/test1.js"></script>
    <div id="pano" style="width:850px; height:400px;">
    <noscript>
    <table style="width:100%;height:100%;">
    <tr style="valign:middle;">
    <td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td>
    </tr>
    </table>
    </noscript>
    <script>
    embedpano({swf:"vr1/test1.swf", xml:"vr1/test1.xml", target:"pano"});
    </script>

    Then, I want to use the buttons (on the bottom) to change another krpano.
    Now it support both pc and iphone/ipad. So I cannot just change the swf file.

    I wannna know if it is possible to switch upper krpano without refresh/reload the page ? *confused*


    Best Regards and Thanks, *love*
    MInkey

  • Hi minkey.

    You shall take approach from the krpano javascript interface, and for changing pano, just call loadpano(pano.xml) from a button in the website.

    You would amaze how simple it is, reach documentation.

    Best regards,
    Ciul

Participate now!

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