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.

Karl

Beginner

  • "Karl" started this thread

Posts: 12

Location: Halle (Saale)

  • Send private message

1

Monday, December 20th 2010, 11:32am

auto tour with resume: oninterrupt works only 1x

Hello,

based on the solution from Klaus http://www.krpano.com/forum/wbb/index.ph…d&threadID=1441 I made an example tour with 1.0.8.12.

The automatic tour looks to 3 points (each with image and sound for 10 seconds). The user can interrupt the tour und the tour resume after some seconds (onidle-event).

It works very well. The only problem is: the user can only interrupt on the way to point1. Inside the action point2 its not possible to interrupt. I think there is no difference between the first and the second action.

Any ideas?

Regards karl


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
38
39
<action name="setuptour">
   set(step,1);
   set(idletime,4);
   set(events.onidle, autotour() );
   showlog(); 
   trace('Inside Setuptour: ',step);
</action>
<action name="autotour">
   trace('Start in Autotour...',step);
   oninterrupt(break);
   if(step == 1, point1(); );
   if(step == 2, point2(); );
   if(step == 3, point3(); );  
</action>
<action name="point1">
   oninterrupt(break);
   trace('in Point1....');
   lookto(-2,-14, 32, smooth(1,5,50));
   action(showimage,img1);
   playsound(auto,sounds/music1.mp3);
   wait(10);
   action(hideimage,img1);
   inc(step);
   trace('End Point 1: following...',step);
</action>
<action name="point2">
   oninterrupt(break);
   trace('in Point2....');
   lookto(-195,-2,15,smooth(5,5,5),false);
   action(showimage,img2);
   playsound(auto,sounds/music2.mp3);
   wait(10);
   action(hideimage,img2);
   inc(step);
   trace('End Point 2: following...',step);
</action>
...... action point3
...... showimage
...... hideimage with stop sound

Karl

Beginner

  • "Karl" started this thread

Posts: 12

Location: Halle (Saale)

  • Send private message

2

Monday, December 20th 2010, 2:31pm

Solution?

I played a little bit with the xml-code, especially with the order in the autotour-action and now the user can interrupt on every way to the next point. The new example. But I dont understand why my first code not correct worked....

Regards Karl

My changes:

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="setuptour">
		set(step,1);
		set(idletime,4);
		set(events.onidle, autotour() );
		showlog(); 
		trace('Inside Setuptour: ',step);
	</action>
	<action name="autotour">
		trace('Start in Autotour...',step);
		oninterrupt(break);
		if(step == 4, trace('set step to 1'); set(step,1); );
		if(step == 3, point3(); ); 
		if(step == 2, point2(); );
		if(step == 1, point1(); );
	</action>
	<action name="point1">
		oninterrupt(break);
		trace('in Point1....');
		lookto(-2,-14, 32, smooth(1,5,50));
		action(showimage,img1);
		playsound(auto,sounds/music1.mp3);
		wait(10);
		action(hideimage,img1);
		inc(step);
		trace('End Point 1: following...',step);
	</action>
.....point2
.....point3
.....etc