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

Tuesday, July 23rd 2013, 6:26pm

how to setup intro scene?

Hello,

I looked around the forum but couldn't find this one specific task that I want to do.

I want to setup a specific scene every time I start up the tour.

For example, I have two scenes... A and B. I want to start at A but every time I open up the panorama tour it starts at scene B.

Can someone please advise this.

Thank you!

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Tuesday, July 23rd 2013, 6:54pm

Hmm...Don't quite understand what you want...

I use this code in the very beginning of the tour:

Source code

1
<krpano version="1.16" onstart="loadscene(get(scene[0].name));>


Which loads the first "scene" of the xml, whatever it is.

If you want some other scene to be the first, just indicate its name:

Source code

1
 <krpano version="1.16" onstart="loadscene(hotel_reception); >


Hope this helps *tongue*
Regards,

Alexey

3

Wednesday, July 24th 2013, 7:52am

Hello Alexey,

Thanks for the reply but I'm still having trouble with this.

I place the first code at the very top and in it fails.

I try the second code and it fails.

The error message states a Fatal Error: tour.xml- Loading or Parsing failed!

Maybe it has something to do with this code?

I'm still playing with it but no go.

<action name="startup">
if(startscene === null, copy(startscene,scene[0].name));
loadscene(get(startscene), null, MERGE);
</action>

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Wednesday, July 24th 2013, 8:41am

I bet there's some mistake in your code or you place it incorrectly. Anyway, it's hard to guess without seeing your xml.
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

5

Wednesday, July 24th 2013, 8:44am

By the way, do you have scenes in one xml file or separate xmls for each pano?
Regards,

Alexey

6

Wednesday, July 24th 2013, 9:22am

I have the scenes in one xml file.

It is also strange because hotspots appear randomly (on the ceiling and etc.)

I tried replacing:

Source code

1
<krpano version="1.16" title="Virtual Tour" onstart="startup();">


with

Source code

1
<krpano version="1.16" title="Virtual Tour" onstart="loadscene(scene_test); >


If you don't mind, here's the original tour.xml.

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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<krpano version="1.16" title="Virtual Tour" onstart="startup();">

	<include url="skin/vtourskin.xml" />

	<!-- set skin settings: bingmaps? gyro? thumbnail controlling? tooltips? -->
	<skin_settings bingmaps="false"
	           	bingmaps_key=""
	           	bingmaps_zoombuttons="false"
	           	gyro="true"
	           	thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
	           	thumbs_opened="false"
	           	thumbs_text="false"
	           	thumbs_dragging="true"
	           	thumbs_onhoverscrolling="false"
	           	thumbs_scrollbuttons="false"
	           	thumbs_scrollindicator="false"
	           	tooltips_thumbs="false"
	           	tooltips_hotspots="false"
	           	tooltips_mapspots="false"
	           	controlbar_offset="20"
	           	/>

	<!-- set optional skin logo url -->
	<layer name="skin_logo" url="" scale="0.25" opened_onclick="openurl('...',_blank);" />


	<action name="startup">
		if(startscene === null, copy(startscene,scene[0].name));
		loadscene(get(startscene), null, MERGE);
	</action>

	
	<scene name="scene_test-irori" title="test-irori" onstart="" thumburl="panos/test-irori.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="72.821" vlookat="22.076" fovtype="MFOV" fov="140.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/test-irori.tiles/preview.jpg" />

		<image>
			<cube url="panos/test-irori.tiles/pano_%s.jpg" />
			<mobile>
				<cube url="panos/test-irori.tiles/mobile_%s.jpg" />
			</mobile>
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="144.163" atv="35.830" linkedscene="scene_test" />
		

	</scene>

	<scene name="scene_test" title="test" onstart="" thumburl="panos/test.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="-341.537" vlookat="18.057" fovtype="MFOV" fov="140.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/test.tiles/preview.jpg" />

		<image>
			<cube url="panos/test.tiles/pano_%s.jpg" />
			<mobile>
				<cube url="panos/test.tiles/mobile_%s.jpg" />
			</mobile>
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="-67.513" atv="14.701" linkedscene="scene_test-irori" />

	</scene>
</krpano>

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

7

Wednesday, July 24th 2013, 9:32am

Your line has a mistake.

It should be:

Source code

1
<krpano version="1.16" title="Virtual Tour" onstart="loadscene(scene_test);" >


You've missed the double quotation mark at the end.
Regards,

Alexey

8

Wednesday, July 24th 2013, 10:27am

damn...

Must be tired.

LOL! *thumbsup*

Thank you!

9

Wednesday, July 24th 2013, 12:52pm

textTable plugin

Hi,

Why don't you also try my textTable pluginas navigation table index for your scenes? This way user can jump to any scene he wants from the first page.

Please let me know if you find this useful or you need any custom feature to be implemented in this plugin?

Best regards
PRAMANJ