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:

    Code
    <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:

    Code
    <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">
  • Hi,

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

    but you can use that:

    Code
    <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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!