You are not logged in.

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

1

Wednesday, March 21st 2012, 6:14pm

pano onclick

Hi,
How can I manage to stop autorotation by clicking in panorama (not on any button, plugin, hotspot)?
I´ve used such a code in Flash Panorama Player: <pano onPress="external.autorotator.disabled=1; "/> how can I do the same here, in krpano?
Thanx a lot,
Best regards,
Igor Socha

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Wednesday, March 21st 2012, 7:51pm

Aldo made a double click plugin.
Look in the top menu at plugins and then field of view plugin bundle

Hope it helps
Tuur *thumbsup*

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

3

Wednesday, March 21st 2012, 8:31pm

Aldo made a double click plugin.
Look in the top menu at plugins and then field of view plugin bundle

Hope it helps
Tuur *thumbsup*



Tuur, but why double click? I do not expect users would be doubleclicking...

Now I have:
<autorotate enabled="true" waittime="5.0" accel="1.0" speed="3" horizon="15" tofov="100"/>

I need exactly the same thing I´ve used in FPP: <pano onPress="external.autorotator.disabled=1; "/>
So I need to trigger the same action if user will click and move pano manually:, there should be such a possibility in krpano, or?

Thanx!
Best regards,
Igor Socha

4

Wednesday, March 21st 2012, 8:46pm

Hi,

this code would do that:

Source code

1
<events onclick="set(autorotate.enabled,false);" />


the global onclick event, and there set the enabled from autorotate to false,

alternatively it would be also possible to use the onmousedown event instead of onclick to disable it already on the button-down and not on click (click = down + up),

best regards,
Klaus

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

5

Wednesday, March 21st 2012, 9:12pm

<events onclick="set(autorotate.enabled,false);" />

Thanx Klaus, I knew it must be very easy job :) Thanx
Best regards,
Igor Socha

igor.socha

Intermediate

  • "igor.socha" started this thread

Posts: 200

Occupation: Photographer

  • Send private message

6

Wednesday, March 21st 2012, 9:50pm

yes, and onmousedown is better, cause if I (click and) drag the panorama, autorotation doesn´t stop, while onmousedown this works 100% ok.
Best regards,
Igor Socha

esys

Intermediate

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

7

Thursday, March 22nd 2012, 10:00pm

Hi,

Thanks i was looking for that! However i'd like to go further if possible.
To begin my tour, i check the var "intro_done". If false, i show, to present, the navigation panel and options before hiding them with a delayed call action:

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
	<action name="intro">

    if(intro_done === null, set(intro_done,false));
    
    if (intro_done == false,
		set(view.hlookat, 117.34);
		set(view.vlookat, 9.46);	
		zoomto(90,linear(28)); 
		moveto(78.87,11.18, linear(50));
        shownav();
		delayedcall(4, hidenav());
        set(intro_done,true);
    );
	</action>

	<action name="shownav">
	
		tween(plugin[bouton_nav].y, 55);	
		tween(plugin[fond_nav].y, 0);
	
	</action>
	
	<action name="hidenav">
	
		tween(plugin[bouton_nav].y, 0);	
		tween(plugin[fond_nav].y, -55);
		tween(plugin[left].y, -50);
		
	</action>


I have different plugins to hide. I write a hide action for each of them, that way, if user click on one of them before the delayed call i could cancel the concerned action. How to do? That's the point.! The <events onclick="" /> is a gobal one. is there a way to assign a first click event to a specified plugin?

Thanks. *smile*
Steph
Steph

8

Saturday, March 24th 2012, 12:52pm

Hi,

you want to stop the "hidenav" delayedcall when specific button were pressed?

canceling a delayedcall directly is currently not possible, but in this case it would be also possible to define a kind of 'stop' variable, that will be checked in the "hidenav" action, and set this 'stop' variable in the button onclick events,

e.g.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
set(dohidenav,true);
delayedcall(4, hidenav());

..

<plugin name="button1" ... onclick="set(dohidenav,false); ... "/>
<plugin name="button1" ... onclick="set(dohidenav,false); ... "/>

...

<action name="hidenav">
  if(dohidenav,
 	...
	);
</action>


best regards,
Klaus