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.

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 158

Location: La Paz, BCS

Occupation: Virtual tours, Krpano coding, Graphic Design

  • Send private message

1

Tuesday, June 7th 2011, 5:39am

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!

Zephyr

Professional

Posts: 968

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Tuesday, June 7th 2011, 10:24am

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.
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 158

Location: La Paz, BCS

Occupation: Virtual tours, Krpano coding, Graphic Design

  • Send private message

3

Tuesday, June 7th 2011, 11:38pm

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!