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.

1

Wednesday, November 10th 2010, 4:18pm

Some Virtual tour examples questions about menu buttons

Hi all,

First post.

I'm testing both AutpanoGiga + Tour/KrPano, and having a lot of fun.
Most of the questions I had were to be found in the examples or documentation, but I'm stuck on two of them.

1. How does one create the "change control mode" switch button, as shown in the examples. E.g. from arrow to hand dragging.
2. How does one fade the menu buttons bar after x seconds, and have it pop back up when moving the mouse? This one eludes me as well. Both must be an event, but I cannot seem to find it in the docs.

Thanks for tips and/or links to the docs.

rob
holland

2

Wednesday, November 10th 2010, 4:39pm

Welcome to the forum.

Here are some Snippits from what I use. Maybe it will help you with fading your menu.

alpha="1"
onover="tween(alpha,1,.8);"
onout="tween(alpha,.4,.8);"
onloaded="delayedcall(5, tween(alpha,.4,.8));"

Basically I start with the plugin with alpha at 1. The delayed call allows for 5 seconds to pass then it Tweens the plugin to .4 and takes .8 seconds to do it.

Change the numbers as you wish.

3

Wednesday, November 10th 2010, 5:15pm

Hi,
1. How does one create the "change control mode" switch button, as shown in the examples. E.g. from arrow to hand dragging.
if you just want to switch the control mode every time you click the button, you can do that with this code:

Source code

1
<plugin .... onclick="switch(control.mousetype, drag2D, moveto);" />


or more complex - with changing the cursors - here's the code from the "buttons-png-include.xml" from the button example from the viewer download package,

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!-- the 'qtvrcursor' action will be called at start to set the qtvr cursor -->
<events onxmlcomplete="action(qtvrcursor);" />

<!-- the two buttons, one for drag mode one for the moveto mode, one is visible, the other invisible 
then clicked the actions for changing the cursors and control mode will be called
-->
<plugin name="dragmode" ... onclick="action(dragcursor);" visible="true"  />
<plugin name="movemode" ... onclick="action(qtvrcursor);" visible="false" />

<!-- the action to change the mouse cursor image and the control mode -->
<action name="dragcursor">
  set(plugin[dragmode].visible, false);
  set(plugin[movemode].visible, true);
  set(control.mousetype, drag2D);
  set(cursors.url, %CURRENTXML%/drag-cursors.png);
  set(cursors.type, drag);
  set(cursors.move,  2|0|30|32); 
  set(cursors.drag, 37|0|30|32);
</action>

<action name="qtvrcursor">
  set(plugin[dragmode].visible, true);
  set(plugin[movemode].visible, false);
  set(control.mousetype, moveto);
  set(cursors.url, %CURRENTXML%/qtvr-cursors.png);
  set(cursors.type, 8way);
  set(cursors.move,       0|0|16|16);
  set(cursors.drag,      16|0|16|16);
  set(cursors.arrow_u,   32|0|16|16);
  set(cursors.arrow_d,   48|0|16|16);
  set(cursors.arrow_l,   64|0|16|16);
  set(cursors.arrow_r,   80|0|16|16);
  set(cursors.arrow_lu,  96|0|16|16);
  set(cursors.arrow_ru, 112|0|16|16);
  set(cursors.arrow_rd, 128|0|16|16);
  set(cursors.arrow_ld, 144|0|16|16);
</action>


best regards,
Klaus

4

Thursday, November 11th 2010, 3:00pm

Hi Guys,

Thanks for the quick reply and answers :-)

Krpano is massive regarding settings. I'll have to dig in deep to see all options...
I only wish Gigapano Tour has some more options available from the GUI.

Cheers all, I'll have some testing to do :-)

rob