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.

bazaar

Trainee

  • "bazaar" started this thread

Posts: 57

Location: Bourgogne, Savoie, Ardèche, France..

Occupation: Photography and Virtual tours

  • Send private message

1

Monday, March 8th 2010, 12:59pm

Next/ prev scenes repeat

Hi,

is there any way to repeat numbered scenes with the nextscene action?

in example, there are 50 different scenes numbered in a tour.

Is it possible to make a loop with nexsscenes action, only between #0 to #30 scenes?

maybe with this kind of action?
"if number of scene is 31, so next plugin loads scene 0"... etc..

Thanks!

regards,
Xavier

2

Monday, March 8th 2010, 1:52pm

Hi,

yes, instead of "scene.count" use your own value (e.g. 30) in the prevscene/nextscene actions,

best regards,
Klaus

bazaar

Trainee

  • "bazaar" started this thread

Posts: 57

Location: Bourgogne, Savoie, Ardèche, France..

Occupation: Photography and Virtual tours

  • Send private message

3

Monday, March 8th 2010, 5:38pm

Hi,

thanks Klaus; but i don't really control all codes yet..
The scenes have to loop between #50 and #90, so i think that should look like this, but doesn't works!

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
	<action name="prevscene">
		if(%1 != findnext, sub(i,90,1));
		txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
		if(scenexml == xml.content, 
		   dec(i);
		   if(i LT 90, sub(i,90,1));
		   loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
		  ,
		   dec(i);
		   if(i GE 50, prevscene(findnext));
		  );
	</action>
	
	<action name="nextscene">
		if(%1 != findnext, set(i,90));
		txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
		if(scenexml == xml.content, 
		   inc(i);
		   if(i == 90, set(i,50));
		   loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
		  ,
		   inc(i);
		   if(i LT 50, nextscene(findnext));
		  );
	</action>


What do you think about it?

Thanks!
Xavier

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Monday, March 8th 2010, 7:39pm

Hi bazaar,

Just an idea reading the code:

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
<action name="prevscene">
	if(%1 != findnext, sub(i,90,1));
	txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
	if(scenexml == xml.content,
   	dec(i);
   	if(i LT 50, sub(i,90,1));
   	loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
  	,
   	dec(i);
   	if(i GE 50, prevscene(findnext));
  	);
</action>

<action name="nextscene">
	if(%1 != findnext, set(i,0));
	txtadd(scenexml,'<krpano>',get(scene[%i].content),'</krpano>');
	if(scenexml == xml.content,
   	inc(i);
   	if(i == 90, set(i,0));
   	loadscene(get(scene[%i].name), null, MERGE, BLEND(1));
  	,
   	inc(i);
   	if(i LT 90, nextscene(findnext));
  	);
</action>


Hope this help...

SAlut.

bazaar

Trainee

  • "bazaar" started this thread

Posts: 57

Location: Bourgogne, Savoie, Ardèche, France..

Occupation: Photography and Virtual tours

  • Send private message

5

Monday, March 8th 2010, 8:43pm

Hi Michel,

returns that scene (null) doesn't exists...
doesn't works *sad*

Xavier

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

6

Monday, March 8th 2010, 10:35pm

Hi Bazaar,

The code is correct ... at least, if your scene 50 to 90 exist !!!!

Source code

1
ERROR: loadscene() - scene "null" not found

That's means you are trying to load a scene that does not exist !!!

Salut.