You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, March 16th 2012, 10:26am

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

Source code

1
2
3
4
5
6
7
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

Source code

1
<div>External div - <button onclick="action1();">MIN</button><button onclick="action2();">PLUS</button></div>        <div id="panocontent">Not loaded</div>

2

Friday, March 16th 2012, 3:49pm

Hi,

try to use the original krpano swf files,
the external interface is disabled by default in the Panotour swf files,

best regards,
Klaus

3

Wednesday, March 28th 2012, 2:51pm

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

4

Thursday, April 12th 2012, 11:23am

Anyone?

5

Monday, April 16th 2012, 6:21pm

Hi,
Is there any way to enable the external interface in Panotour?
no, I don't think there is an option for that in Panotour but theoretical it would be possible of course, it's just an internal setting,

Or should I make the panoramas myself with krpano?
you would only need to replace the swf file once, that's all,

best regards,
Klaus

Similar threads