Autotour to multiple hotspots via javascript

  • Hello krpano enthusiasts.

    I'm asking a question that is already asked and apparently solved but it doesn't seem to work for me. I want to create an autotour via javascript, which visits two hotspots.

    So, I have created an action as follows


    Code
    <action name="autotour">	 looktohotspot(Hotspot1,,smooth(20,20,20));tween(hotspot[Hotspot1].alpha,'1.0', 3)
    		looktohotspot(Hotspot2,,smooth(20,20,20));tween(hotspot[Hotspot2].alpha,'1.0', 3)</action>


    and then, via javascript I call krpano.call( "autotour()" );


    The effect that I obtain is that the view goes to Hotspot1 but then it stops, and thus it does not go forward to Hotspot2. And I'm stucked.

    Any help appreciated!

  • hello!

    I used the same thing! But I also need better solution.

    My solution is:

    Quote


    lookto(get(hotspot[h54].ath),get(hotspot[h54].atv),,smooth(20,20,20),true,true,
    tween(hotspot[h54].alpha,'1.0', 3); lookto(get(hotspot[h52].ath),get(hotspot[h52].atv),,smooth(20,20,20));tween(hotspot[h52].alpha,'1.0', 3));

    lookto has donecall, but looktohotsot does not.

    it is working for me.

    Hope it helps!

  • Thank you very much, it works!

    I'd have expected that the tween(hotspot[h52].alpha,'1.0', 3) was put in a callback function of the second lookto(), but it works as you wrote.

Participate now!

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