external javascript with Panotour Pro

  • Hi all,

    As I am new to krpano and panotour pro I am playing around with both.
    I successfully managed to control krpano example files by external javascript using embedpano({id:"brandflash"}), document.getElementById("brandflash"), get() and set().
    However, when using the same functions on a virtual tour created with Panotour Pro, only get() is working and set() is not found: Uncaught TypeError: Object # has no method 'set'
    Am I missing something or is the PTP flash read-only? And how can I solve my problem?


    Many thanks in advance!


    Regards,
    eriktronic


    JS

    Code
    function onload() {   embedpano({id:"brandflash",target:"panocontent",swf:"brandflash.swf",xml:"brandflash.xml"});}
    function pano() {   return document.getElementById("brandflash");}
    function action1() {
       var krpano = pano();   var fov = Number( krpano.get("view.fov") );   fov += 10.0;   krpano.set("view.fov", fov);}
    function action2() {
       var krpano = pano();   var fov = Number( krpano.get("view.fov") );   fov -= 10.0;
       krpano.set("view.fov", fov);}


    HTML

    Code
    <div>External div - <button onclick="action1();">MIN</button><button onclick="action2();">PLUS</button></div>        <div id="panocontent">Not loaded</div>
  • Hi Klaus,

    Thanks for your reply.
    With the original files it seems it work.
    Is there any way to enable the external interface in Panotour?
    Or should I make the panoramas myself with krpano?

    Many thanks,
    Erik

Participate now!

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