You are not logged in.

Dear visitor, welcome to 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.


Wednesday, November 12th 2014, 7:47am

scene switching method that uses the javascript


I want to switch the scene using javascipt.

function changepano(panoName)
var krpano = document.getElementById("krpanoSWFObject1");"loadscene(" + panoName + ");");

I am using this code.

Please look at the test site.

Test site

I click the hot spot.

Flashes of hot spots faster.

This would be a bug? Please tell me.



Wednesday, November 12th 2014, 8:05am


no bug in krpano, but a bug in the Panotour xml, the xml hotspot animation code there hasn't a 'stop' condition for the case that the hotspot will be unloaded/removed, so the animation action keeps running also when then a new pano will be loaded and the hotspot has been removed - and when there is the hotspot with the same name, the old and the new animation actions will run on the same hotspot and so the the animation will get faster with each new pano.

In your test_core.xml change in the 'animate' <action> this part:

Source code

delayedcall(%2, animate(%1,%2) );

to this:

Source code

delayedcall(%2, if(loaded, animate(%1,%2)) );

Best regards,


Wednesday, November 12th 2014, 9:38am


Answer Thank you.

Is it possible to implement only in JavaScript without change the xml?



Wednesday, November 12th 2014, 9:41am

Sorry, but how do you mean that???

The xml code itself is wrong and would need to be changed.


Wednesday, November 12th 2014, 10:19am

After modifying the xml was movement successfully.

Thank you.

>Sorry, but how do you mean that???

Because it uses the Panotour Pro, it is bothersome to modify the xml each time.

Is this Panotour Pro bug?




Posts: 3

Occupation: Panotour/Panotour Pro manager

  • Send private message


Friday, November 14th 2014, 11:48am

Is this Panotour Pro bug?
No as far as you do not call the panotour load action.

Panotour generates another load action that interrupts the animation, so the animation is not speed up when reopening the scene.

Instead of loadscene, call mainloadscene .

Or if you still want to use loadscene, call also the other parts of the mainloadscene actions.

By the way we added some checks in the animate action, so in the 2.3 final version you should not have such behaviour even when using the wrong loadscene action.