Help!!! How to activate one hotspot when clicking on another?

  • Hello there! Right now I'm working in a virtual tour, developing an option to show a image flyout which will emerge from a place where a polygonal hotspot is set, more precisely I want to mark a sculpture as a hotspot (by a polygonal hotspot) which will show a detailed photo (by a flyout image) when the user clicks into the polygonal hotspot. I already have the flyout animation working and also the polygonal hotspot, my question is ¿How can I trigger the "onclick" action specified in the flyout image by clicking the polygonal hotspot? ¿Any idea?

    Your help is really appreciated, Thank you!

  • you call upon the same action?

    <hotspot name="yourflyoutimage" onclick="doflyout()" etc />
    <hotspot name="yourpolygonalhotspot" onclick="doflyout()" etc />

    <action name="doflyout">
    set(hotspot[yourflyoutimage].atv, 0);
    etc
    </action>

    not sure how your flyout looks like, but it should work like this.

  • Okey, in the end it finally work, I rewrote the code for the flyout action, so I could call it specifically for any "Flyout hotspot". Using something like flyout(spotname) it activates the flyout of the desired hotspot, inside the function I used %1 as a reference for the action. My trouble is that I was using a function code copied from the "Krpano viewer examples" which works from inside the <hotspot> tag, because it's activated from the "onclick" event, it refers all the hotspot parameters to the ones specified inside the specific flyout hotspot tag, which wouldn't work activated from another hotspot. Anyway, thank you Zephyr for that answer, I really like the collaboration ambience here in krpano forum, that's really useful for beginners like myself. *thumbup*

    Ohh, by the way, the final animation flyout looks pretty cool for my taste, when the tour is done I'll post it for critics. Regards!

Participate now!

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