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

Thursday, December 2nd 2010, 4:06pm

lookto onloadcomplete

Hello,

I have first image in my tour - flat. Flat image should be panned and zoomed and after that first panorama is loading.

I want to load first flat image fully, and only after that start zooming, I tried to use onloadcomplete for that, but then somehow lookto works for the second loaded pano, so it looks like second pano start repeating -load-lookto-load-lookto... adn so on..
here is my code:

Source code

1
2
<krpano version="1.0.8" logkey="false"> 
<events onloadcomplete="lookto(0.01,0.22,0.51,smooth(0.1,0.01,0.1));loadpano(gr.xml,null,null,BLEND(1));set(autorotate.enabled,false);"/> 


what i did wrong?

this works fine:

Source code

1
<krpano version="1.0.8" onstart="wait(2);lookto(0.01,0.22,0.51,smooth(0.1,0.01,0.1));loadpano(gr.xml,null,null,BLEND(1));set(autorotate.enabled,false);" logkey="false">

2

Monday, December 6th 2010, 4:47pm

Hi,

the code in the onloadcomplete event will not be reseted when loading a new pano,

but you can use that:

Source code

1
<events onloadcomplete="set(events.onloadcomplete,null); lookto(...); ..." />


with this code the events will be set back to null after the first call,
then it will do nothing when the loading of the next pano is done,

best regards,
Klaus

3

Tuesday, December 14th 2010, 3:35am

Thank you, it works!