You are not logged in.

1

Thursday, September 10th 2009, 9:22pm

Stop lookto on user click

Hi everybody,

The panorama start at this position :

onstart="lookat(50,18,97);

Then the folowing actions take place:

<action name="OnLoadComplete">
wait(blend);
wait(1);
lookto(-66,29,90,smooth(100,20,50));
set(autorotate.enabled,true);
</action>

I would like the lookto to be stopped when a user click in the panorama... is it possible ?


I currently use this clicked action which is working:

<action name="Clicked">
set(autorotate.waittime,"5");
</action>

I tried to put stopall(); but it doesn't stop the lookto action.


Thanks.
Maxime

2

Thursday, September 10th 2009, 9:54pm

oninterrupt is what you are looking for. (I believe)

The following link should take you to the documentation.

http://www.krpano.com/docu/actions/#oninterrupt

3

Thursday, September 10th 2009, 10:04pm

oninterrupt is what you are looking for. (I believe)

The following link should take you to the documentation.

http://www.krpano.com/docu/actions/#oninterrupt
Exactly !

Thank you very much Jarredja for your fast answer.

4

Thursday, September 10th 2009, 10:18pm

Hi,

yes, oninterrupt will be the right function for this

call it before the lookto actions,
e.g.

Source code

1
2
oninterrupt(break);
lookto(...);


best regards,
Klaus

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

5

Tuesday, April 3rd 2012, 11:02pm

Hi, since i have used add hotspot for video distorted hostop the oninterrupt(break) does not work anymore, for look to or for tween, i have tested all the options

even this one





Quoted


<action name="tweenintro">
oninterrupt( lookinterrupt() );
tween(view.hlookat, 180, 10.0, easeInOutQuint);
tween(view.vlookat, 5, 10.0, easeInOutQuint);
tween(view.fov, 60, 10.0, easeOutQuad);
</action>

<action name="lookinterrupt">
stoptween(view.hlookat);
stoptween(view.vlookat);
stoptween(view.fov);
</action>




or the most simple

Quoted


<action name="tweenintro">
oninterrupt(break);
lookto(70,5,100,tween(easeInOutCubic,10),true,true) ;
</action>




the on interrupt breakall does not work to.


i have no solution


Thank you for your lights



JPC

*cry*

6

Wednesday, April 4th 2012, 3:27pm

Hi,

the oninterrupt works only on actions that are blocking the user interface,
but the tween without WAIT for donecall doesn't block it,
and the lookto call with true for non-blocking doesn't block it too,

that means either try it that way - by adding a wait() after the tweens:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<action name="tweenintro">
  oninterrupt( lookinterrupt() );
  tween(view.hlookat, 180, 10.0, easeInOutQuint);
  tween(view.vlookat, 5,  10.0, easeInOutQuint);
  tween(view.fov, 60, 10.0, easeOutQuad);
  wait(10.0);
</action>
 
<action name="lookinterrupt">
  stoptween(view.hlookat);
  stoptween(view.vlookat);
  stoptween(view.fov);
</action>


or in your the most simple case just without nonblocking=true:

Source code

1
2
3
4
<action name="tweenintro">
  oninterrupt(break);
  lookto(70,5,100,tween(easeInOutCubic,10),true,false) ;
</action>


best regards,
Klaus

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

7

Sunday, April 8th 2012, 10:18am

Thank you for your answer, it is very clear, it works perfectly when i use standard distorted video hotspot but it doesn't work when i use addhotspot instead.

In fact in need to use add hotspot to manage the video downloading order, so…

maybe there is an other reason but i don't think so.

i can send you my code if you have the time to have a look.

best regards

JPC

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

8

Sunday, April 8th 2012, 3:37pm

to be more precise

when i use lookto the interface wait the lookto is finished to addhospot.

when i use tween with wait the tween simply doesn't work

when i use tween without wait the tween work but without interrupt off course.


JPC

9

Thursday, April 12th 2012, 8:30am

Hi,
when i use tween with wait the tween simply doesn't work
please show the code you use,

best regards,
Klaus

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

10

Sunday, April 15th 2012, 10:34pm

Sorry for the delay, thank you

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
<action name="playintrodis">
set(introdis,true);set(videostate,bienvenu);
chargerbienvenu();action(playbienvenuifready);
set(plugin[bienvenu].onclick,set(videostate,bienvenu);loadscene(scene_ericchauvin1,view.hlookat=70&view.vlookat=5&view.fov=100,MERGE,BLEND(2));chargerbienvenu();action(playbienvenu));

tweenintro();

set(plugin[skipintro].enabled,false);tween(plugin[skipintro].alpha,0,2,);
tween(plugin[intro].alpha,0,7);
delayedcall(3,tween(plugin[intro].volume,0.09,5,easeInOutCubic));
set(skipintrogoodby,true);
</action>

		
<action name="tweenintro">
  oninterrupt(lookinterrupt());
  tween(view.hlookat, 20, 10.0, easeInOutQuint);
  tween(view.vlookat, 5,  10.0, easeInOutQuint);
  tween(view.fov, 100, 10.0, easeOutQuad);
  wait(10);
</action>
 
 
<action name="lookinterrupt">
  stoptween(view.hlookat);
  stoptween(view.vlookat);
  stoptween(view.fov);
</action>

11

Monday, April 16th 2012, 7:49pm

Hi,

the code itself looks okay,
but note - the wait() is blocking to whole actions system - that means the actions after the 'tweenintro' call will execute after the 10 second wait!

best regards,
Klaus

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

12

Wednesday, April 18th 2012, 2:26pm

Ok, thank you, its working better, and i understand better but i have another problem with this intro, when i interrupt, the tween apha from the intro interrupt too, and i don't understand why because there is only tween view in the interrupt action.

an other limitation is that the wait have to be finished to begin the "bienvenu" video.


do you have a solution for this two questions.


Thank you very much


the link


http://www.camus.pro/vtourchauvin/tour.html

13

Thursday, April 19th 2012, 4:39pm

Hi,

all following actions after the 'oninterrupt' will be interrupted,

to avoid that reorder the actions or split the action into different parts and call the actions that should happening oninterrupt too in the call that will be defined in the oninterrupt(...here...) action,

best regards,
Klaus

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

14

Tuesday, April 24th 2012, 4:50pm

Thank you for your answer, it works,and its clear, http://krpano.com/forum/wbb/wcf/images/smilies/smile.png

I have an other question i hope more interesting for you, when i change the view with a load scene and a blend merge, the video distorted hotspot fixe on the beginning from the blend,

do you think there is a way the video is playing to the end of the blend, without keeping the same view. It is really embarrassing.

Tell me if my english and my question is not understandable.

if(understandable
,thank you in advanced for your answer);


JPC

15

Tuesday, April 24th 2012, 6:18pm

Tell me if my english and my question is not understandable.
sorry - not understandable...

JPC

Beginner

Posts: 40

Location: Paris

Occupation: Photographies and media

  • Send private message

16

Wednesday, April 25th 2012, 2:00pm

ok

i am in a pano with a video distorded hotspot playing, i want a kind of cutting plane, with a look at blend and merge like this

loadscene(scene_ericchauvin1,view.hlookat=150&view.vlookat=-10&view.fov=80,MERGE,BLEND(2))


the problem is that the video stop at the begining of the merging blend, the sound is ok but the picture fixe,

could it possible to prevent this.


Thank you


JPC