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.

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 287

Location: Berlin

  • Send private message

1

Monday, December 5th 2011, 9:41am

pop up on panning: how to?

Hello,

is there a smart way to use the current pan values for displaying some kind of info box when panning around? I.e. Whilst panning, some additional infos should pop up automatically when passing by some predefined hotspots. Tried a quick search but no results.

Michael

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Monday, December 5th 2011, 10:30am

you could use the onviewchange event, to read out the current pan, and display a popup based on that.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<events onviewchange="popup()" />

<action name="popup">
  if(ath GT 0,
        if(ath LT 90,
                //if the pan is between 0 and 90, your popup script here
        );
 );
  if(ath GT 90,
        if(ath LT 180,
                //if the pan is between 90 and 180, your popup script here
        );
 );
</action>
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).

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 287

Location: Berlin

  • Send private message

3

Monday, December 5th 2011, 3:01pm

Thank you very much Zephyr! Sounds like a very straightforward solution to me. I will try.

Michael