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

Sunday, August 28th 2016, 11:01pm

Anzeige von Showtext bei Polygonhotspots im gesamten Panorama durch Button ein- und ausblenden

In meiner virtuellen Tour möchte ich einige der Exponate der Ausstellung mit Showtext-Infotexten versehen. Die werden dann ja beim Überfahren mit dem Mauszeiger angezeigt. Beim Betrachten und Navigieren kann das aber störend wirken. Daher möchte ich mit einem Button die Anzeige der Infotexte ein- und ausschalten können.

Eine Info-Anzeige in der Navigationsleiste wäre schöner als ein Extra-Button daneben.

Die Tour möchte ich dem Museum unentgeltlich zur Verfügung stellen.

Wie könnte diese Funktion in der tour.xml aussehen?



Viele Grüße

Panox

toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

2

Tuesday, August 30th 2016, 10:41am

Schau mal in die vtourskin.xml und suche nach "skin_control_bar_buttons", innerhalb sind die Buttons platziert.

3

Tuesday, August 30th 2016, 11:30am

Danke für Deinen Hinweis. Autorotate habe ich schon einmal dort unterbringen können. Mal sehen, ob ich den Code noch finde. Ganz einfach war das mit den Crop-Daten nicht.

Weißt Du, ob das globale Aktivieren und Deaktivieren von Showtext-Anzeigen mit einem Button realisierbar ist?

Könntest Du mir mit einem Code-Schnipsel aushelfen?

toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

4

Tuesday, August 30th 2016, 12:23pm

Dafür würde ich showtext durch eine eigene Action kapseln und somit die Anzeige verhindern:

<action name="showtext2">
if( anzeigen,
showtext(%1);
);
</action>

So kannst du durch set( anzeigen, 0) das anzeigen verhindern.

5

Tuesday, August 30th 2016, 9:25pm

Hallo toosten, ich krieg es noch nicht hin.

Source code

1
2
3
4
5
6
7
<action name="showtext2">
if( anzeigen,
showtext(%1);
);
</action>
		
		<layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="showtext2"/> 


Könntest Du diese Zeilen bitte so korrigieren, dass der Button "info.png" als An- /Ausschalter zu nutzen ist? Am besten sind ja zwei png-Bilder, die sich mit AN und AUS abwechseln.

Ich würde mich sehr freuen, wenn ich so eine Funktion für die Tour des Heimatmuseums einbauen könnte.

Leider reichen meine Code-Kenntnisse nicht so weit. Vielen Dank für Deinen Input!

toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

7

Wednesday, August 31st 2016, 3:21pm

Source code

1
2
3
4
5
6
7
<action name="showtext2">
if( anzeigen,
showtext(%1);
);
</action>
		
		<layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="switch(anzeigen)"/> 


So wird der Showtext angezeigt, auch ein Umschalten von anzeigen zu verbergen wird nicht durch den Klick auf den Button ausgelöst.

Wo steht dann der Code "set( anzeigen, 0)"

Es soll auch kein Text "anzeigen" zu sehen sein. Mir wird nicht klar, woher dieses Wort kommt und ob es ein Befehl ist.



Der Infobutton sollte das Umschalten des angezeigten Showtextes möglich machen.

toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

8

Wednesday, August 31st 2016, 3:36pm

anzeigen soll eine Variable sein, in der der der Zusand gespeichert wird ( 0|1 oder false|true).
Die Variable dient dazu, das die Action showtext2 entscheiden kann ob showtext aufgerufen werden soll.
Wo steht dann der Code "set( anzeigen, 0)"
Wo du die Variable deklarierst ist mir völlig egal!

9

Wednesday, August 31st 2016, 4:27pm

toosten, ich danke Dir für Deine Tipps, aber ich bin kein Entwickler und kann meist nur auf das zurückgreifen, was mir von Klaus als Code vorgegeben worden ist und auf einige, sehr hilfreiche Codepassagen, oft auch als "Codeschnipsel" bezeichnet.

Dabei versuche ich schon, den Ablauf und den Sinn der Zeilen zu verstehen.

Hier komme ich allerdings trotz Deiner Bemühungen nicht zum Ziel.

Source code

1
2
3
4
5
6
7
8
9
<!-- place your scene hotspots here -->
		
		<action name="showtext2">
if( verbergen,
showtext(%0);
);
</action>
		
		<layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="switch(verbergen)"/>



Du sagst, Dir ist es egal, wo ich eine Variable deklariere. OK, aber muss ich nun noch eine Zeile dazuschreiben, in der ich die Variable "anzeigen" deklariere?


Kannst Du vielleicht mal ein funktionierendes Pano-Beispiel mit dem funktionierenden Code hochladen?

Egal, was ich nun an deinen Zeilen verändere, die Erläuterung "Pförtchenpfanne" wird immer angezeigt.

toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

10

Wednesday, August 31st 2016, 4:34pm

Du kannst scheinbar nicht programmieren und meine Glaskugel ist defekt! *whistling*

Eventuell solltest du mal ein Link posten, dann kann man die anderen 99% des Codes sehen und eventuell helfen! *thumbsup*

11

Wednesday, August 31st 2016, 6:19pm

Den Link zur Tour kann ich nicht posten, denn die ist noch nicht fertig und muss erst vom Museum freigegeben werden.

Hier ist der Code der 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<krpano version="1.19" title="Virtuelle Tour Heimatmuseum Bargteheide">

<include url="skin/vtourskin.xml" /> 
<include url="%SWFPATH%/plugins/showtext.xml" />
<plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true"></plugin>


	
	<hotspot name="nadirlogo" keep="true" url="skin/logo.png" ath="0" atv="90" distorted="true" alpha="0.5" scale="0.5" rotate="15.0" enabled="false"></hotspot>

<events name="nadirlogo_automatic_rotation" keep="true" onviewchange="copy(hotspot[nadirlogo].rotate, view.hlookat);"></events>     
	
		<!-- <plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" view="true" display="true" control="false" image="true" onloaded="open();"></plugin>  
    <plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true"></plugin>	<plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" view="true" display="true" control="false" image="true" onloaded="open();"></plugin>  
    	 -->
	
	

	<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
	

	<skin_settings maps="false"
	               maps_type="google"
	               maps_bing_api_key=""
	               maps_google_api_key=""
	               maps_zoombuttons="false"
	               gyro="true"
	               webvr="true"
	               webvr_gyro_keeplookingdirection="false"
	               littleplanetintro="false"
	               title="true"
	               thumbs="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"
	               thumbs_loop="false"
	               tooltips_buttons="false"
	               tooltips_thumbs="true"
	               tooltips_hotspots="true"
	               tooltips_mapspots="false"
	               deeplinking="false"
	               loadscene_flags="MERGE"
	               loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
	               loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
	               loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"
	               loadingtext="loading..."
	               layout_width="100%"
	               layout_maxwidth="814"
	               controlbar_width="-24"
	               controlbar_height="40"
	               controlbar_offset="20"
	               controlbar_offset_closed="-40"
	               controlbar_overlap.no-fractionalscaling="10"
	               controlbar_overlap.fractionalscaling="0"
	               design_skin_images="vtourskin.png"
	               design_bgcolor="0x2D3E50"
	               design_bgalpha="0.8"
	               design_bgborder="0"
	               design_bgroundedge="1"
	               design_bgshadow="0 4 10 0x000000 0.3"
	               design_thumbborder_bgborder="3 0xFFFFFF 1.0"
	               design_thumbborder_padding="2"
	               design_thumbborder_bgroundedge="0"
	               design_text_css="color:#FFFFFF; font-family:Arial;"
	               design_text_shadow="1"
	               />

	<!--
	    For an alternative skin design either change the <skin_settings> values 
	    from above or optionally include one of the predefined designs from below.
	-->
	<!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
	<!-- <include url="skin/vtourskin_design_glass.xml"       /> -->
	<!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
	<!-- <include url="skin/vtourskin_design_117.xml"         /> -->
	<!-- <include url="skin/vtourskin_design_117round.xml"    /> -->
	<!-- <include url="skin/vtourskin_design_black.xml"       /> -->


	<!-- startup action - load the first scene -->
	<action name="startup" autorun="onstart">
		if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
		loadscene(get(startscene), null, MERGE);
		if(startactions !== null, startactions() );
	</action>
	
		 <plugin name="soundinterface"
        url="soundinterface.swf"
        alturl="soundinterface.js"
        preload="true"
        rootpath=""
        volume="1.0"
        mute="false"
        /> 


	
	<scene name="scene_1_Vorgeschichte-Ortskunde" title="Vorgeschichte-Ortskunde" onstart="" havevrimage="true" thumburl="panos/1_Vorgeschichte-Ortskunde.tiles/thumb.jpg" lat="" lng="" heading="">
	
		<layer name="skin_btn_autorotate" style="skin_glow" url="autorotate.png" align="bottom" x="415" y="20" scale="0.55" onclick="switch(autorotate.enabled);" />
		
		<!-- <layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="switch(autorotate.enabled);" /> -->
		

		<view hlookat="-230.586" vlookat="1.704" fovtype="MFOV" fov="87.075" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/1_Vorgeschichte-Ortskunde.tiles/preview.jpg" />
		
	

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/1_Vorgeschichte-Ortskunde.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="-65.693" atv="32.782" linkedscene="scene_2_baeuerliche_geraete" />
		
			

	</scene>

	<scene name="scene_2_Baeuerliche_Geraete" title="Bäuerliche Geräte" onstart="" havevrimage="true" thumburl="panos/2_Baeuerliche_Geraete.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="155.460" vlookat="2.111" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/2_Baeuerliche_Geraete.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/2_Baeuerliche_Geraete.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/2_Baeuerliche_Geraete.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/2_Baeuerliche_Geraete.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/2_Baeuerliche_Geraete.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/2_Baeuerliche_Geraete.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/2_Baeuerliche_Geraete.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="82.402" atv="31.592" linkedscene="scene_3_hauswirtschaft" />
		<hotspot name="spot2" style="skin_hotspotstyle" ath="-147.662" atv="24.668" linkedscene="scene_4_verkehr-handel-handwerk" />
		<hotspot name="spot3" style="skin_hotspotstyle" ath="-88.756" atv="29.293" linkedscene="scene_1_vorgeschichte-ortskunde" />

	</scene>

	<scene name="scene_3_Hauswirtschaft" title="Hauswirtschaft" onstart="" havevrimage="true" thumburl="panos/3_Hauswirtschaft.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="22.948" vlookat="0.724" fovtype="MFOV" fov="108.762" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/3_Hauswirtschaft.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/3_Hauswirtschaft.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/3_Hauswirtschaft.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/3_Hauswirtschaft.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/3_Hauswirtschaft.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/3_Hauswirtschaft.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/3_Hauswirtschaft.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		
		<action name="showtext2">
if( verbergen,
showtext(%0);
);
</action>
		
		<layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="switch(verbergen)"/> 
		
		
		<!-- Textstyle STYLE3 -->
	<textstyle name="STYLE3"
	           font="Arial" fontsize.no-mobile="16" fontsize.mobile="26" italic="false"
	           background="true" backgroundcolor="0xFFFFFF"
	           border="true"
	           textalign="center"
	           roundedge="10"
	          
	           shadow="4" shadowrange="4" shadowcolor="0x333333" shadowangle="70" shadowalpha="0.7" fadeintime="0.5"
	          
	           yoffset.no-touch="-5"
	           yoffset.touch="-40"
			   padding="10"
			   xoffset="150"
			   yoffset="-3"
	           />
			   
		
		
		<hotspot name="hs1" capture="false" fillcolor="0xaaaaaa" fillalpha="0.0" borderwidth="3.0" bordercolor="0xaaaaaa" borderalpha="0.0" onhover="showtext(Pförtchenpfanne,STYLE3,);" 
	         depth="1000"
	         polyline="false"
	         scaleflying="true"
	         tx="0"
	         ty="0"
	         tz="0"
	         >
		
		<point ath="-23.283185" atv="3.354706" />
		<point ath="-20.959386" atv="4.798115" />
		<point ath="-20.086243" atv="7.796745" />
		<point ath="-21.588116" atv="10.319473" />
		<point ath="-23.451252" atv="10.654968" />
		<point ath="-25.566479" atv="9.592913" />
		<point ath="-25.905179" atv="5.460199" />
	</hotspot>
	

		<hotspot name="hs2" fillcolor="0xaaaaaa" fillalpha="0.0" borderwidth="3.0" bordercolor="0xaaaaaa" borderalpha="0.0" onhover="showtext(Einweckkochtopf,STYLE3,);" 
	         depth="1000"
	         polyline="false"
	         scaleflying="true"
	         tx="0"
	         ty="0"
	         tz="0"
	         >
		<point ath="-69.584951" atv="21.343867" />
		<point ath="-66.616001" atv="19.057762" />
		<point ath="-61.238516" atv="18.178987" />
		<point ath="-55.545726" atv="19.763668" />
		<point ath="-54.21163" atv="23.135007" />
		<point ath="-55.100193" atv="26.91179" />
		<point ath="-54.68702" atv="35.589672" />
		<point ath="-60.399924" atv="38.385311" />
		<point ath="-66.751948" atv="37.533629" />
		<point ath="-69.006926" atv="35.704348" />
	</hotspot>

	
	
	
		<hotspot name="spot1" style="skin_hotspotstyle" ath="177.183" atv="34.052" linkedscene="scene_2_baeuerliche_geraete" />

	</scene>

	<scene name="scene_4_Verkehr-Handel-Handwerk" title="Verkehr-Handel-Handwerk" onstart="" havevrimage="true" thumburl="panos/4_Verkehr-Handel-Handwerk.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="-30.396" vlookat="2.030" fovtype="MFOV" fov="77.704" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/4_Verkehr-Handel-Handwerk.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/4_Verkehr-Handel-Handwerk.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="-20.688" atv="32.715" linkedscene="scene_5_handwerk-imkerei" />
		<hotspot name="spot2" style="skin_hotspotstyle" ath="172.245" atv="25.029" linkedscene="scene_2_baeuerliche_geraete" />
		<hotspot name="spot4" style="skin_hotspotstyle" ath="155.301" atv="15.261" linkedscene="scene_handwerk-vorn" />

	</scene>

	<scene name="scene_5_Handwerk-Imkerei" title="Handwerk-Imkerei" onstart="" havevrimage="true" thumburl="panos/5_Handwerk-Imkerei.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="162.747" vlookat="-2.754" fovtype="MFOV" fov="96.201" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/5_Handwerk-Imkerei.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/5_Handwerk-Imkerei.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/5_Handwerk-Imkerei.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/5_Handwerk-Imkerei.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/5_Handwerk-Imkerei.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/5_Handwerk-Imkerei.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/5_Handwerk-Imkerei.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot1" style="skin_hotspotstyle" ath="61.290" atv="37.692" linkedscene="scene_4_verkehr-handel-handwerk" />
		<hotspot name="spot3" style="skin_hotspotstyle" ath="-43.023" atv="32.157" linkedscene="scene_schmiede" />

	</scene>
	
	<scene name="scene_Handwerk-vorn" title="Handwerk-vorn" onstart="" havevrimage="true" thumburl="panos/6_Handwerk-vorn.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/6_Handwerk-vorn.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="11328" tiledimageheight="11328">
				<cube url="panos/6_Handwerk-vorn.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="5696" tiledimageheight="5696">
				<cube url="panos/6_Handwerk-vorn.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2816" tiledimageheight="2816">
				<cube url="panos/6_Handwerk-vorn.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1536" tiledimageheight="1536">
				<cube url="panos/6_Handwerk-vorn.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="768" tiledimageheight="768">
				<cube url="panos/6_Handwerk-vorn.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/6_Handwerk-vorn.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot2" style="skin_hotspotstyle" ath="-1.452" atv="23.637" linkedscene="scene_handwerk_hinten" />
		
		<!-- Sound -->
  
  <!-- load the soundinterface plugin -->
   	<plugin name="soundinterface" url="%SWFPATH%/plugins/soundinterface.swf" alturl="%SWFPATH%/plugins/soundinterface.js" rootpath="" preload="true" keep="true"></plugin>


    <!-- start playing the sound -->
    <events name="currentpano"
            onnewpano=""
            onremovepano="stopsound(bgsnd);"
            />


    <!-- button to pause the sound: -->
    <plugin name="snd" url="soundonoff.png" ath="+110" atv="+12" alpha="0.75" scale="1" onover="tween(alpha,1);" onout="tween(alpha,0.25);"
            crop="0|0|50|50"
            onloaded="if(ismobile,set(scale,1));"
            onclick="startsound();"
            />

       <action name="startsound">
  playsound(bgsnd, 'tonne.mp3|tonne.ogg', 0);
  set(plugin[snd].onclick, pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50););
</action>



	</scene>


<scene name="scene_Handwerk_hinten" title="Handwerk_hinten" onstart="" havevrimage="true" thumburl="panos/7_Handwerk_hinten.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/7_Handwerk_hinten.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="11328" tiledimageheight="11328">
				<cube url="panos/7_Handwerk_hinten.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="5696" tiledimageheight="5696">
				<cube url="panos/7_Handwerk_hinten.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2816" tiledimageheight="2816">
				<cube url="panos/7_Handwerk_hinten.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1536" tiledimageheight="1536">
				<cube url="panos/7_Handwerk_hinten.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="768" tiledimageheight="768">
				<cube url="panos/7_Handwerk_hinten.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/7_Handwerk_hinten.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot2" style="skin_hotspotstyle" ath="-76.110" atv="23.970" linkedscene="scene_handwerk-vorn" />
		<hotspot name="spot3" style="skin_hotspotstyle" ath="-81.009" atv="7.382" linkedscene="scene_1_vorgeschichte-ortskunde" />

	</scene>


<scene name="scene_Schmiede" title="Schmiede" onstart="" havevrimage="true" thumburl="panos/8_Schmiede.tiles/thumb.jpg" lat="" lng="" heading="">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

		<preview url="panos/8_Schmiede.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
			<level tiledimagewidth="9472" tiledimageheight="9472">
				<cube url="panos/8_Schmiede.tiles/%s/l5/%v/l5_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="4736" tiledimageheight="4736">
				<cube url="panos/8_Schmiede.tiles/%s/l4/%v/l4_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="2304" tiledimageheight="2304">
				<cube url="panos/8_Schmiede.tiles/%s/l3/%v/l3_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="1152" tiledimageheight="1152">
				<cube url="panos/8_Schmiede.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />
			</level>
			<level tiledimagewidth="640" tiledimageheight="640">
				<cube url="panos/8_Schmiede.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />
			</level>
		</image>

		<image if="webvr.isenabled">
			<cube url="panos/8_Schmiede.tiles/vr/pano_%s.jpg" />
		</image>

		<!-- place your scene hotspots here -->
		<hotspot name="spot2" style="skin_hotspotstyle" ath="65.910" atv="22.460" linkedscene="scene_4_verkehr-handel-handwerk" />

	</scene>



</krpano>


Und ja, ich kann nicht programmieren, bin aber über jede Hilfe dankbar! *smile*

Hier ein Testbeispiel mit einem anderen Panoramabild:

http://www.pano.szenerien.de/showtext-test/vtour.zip

This post has been edited 1 times, last edit by "panox" (Aug 31st 2016, 6:58pm)


toosten

Intermediate

Posts: 521

Location: Berlin

Occupation: Software-Entwickler bei VR-Easy ( HTML, JS, PHP, krpano, C++, Java )

  • Send private message

12

Wednesday, August 31st 2016, 9:18pm

Eine Beispiel-Tour ist perfekt!

http://krpano.com/docu/xml/#events.onxmlcomplete
- init sorgt dafür das die action showtext durch unsere ersetzt wird

showtext_panox
- testet auf verbergen

change_verbergen
- wechselt das Icon je nach zustand ( info.png => info_ein.png & info_aus.png )

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<events onloadcomplete="init" />
	<action name="init">
		set(showtext, action(showtext_panox,'%%1','%%2') );
		set(verbergen, false);
	</action>
	
	<action name="showtext_panox">
		if( verbergen,
		,
			showtext_xml( %1, %2);
		);
	</action>
	
	<action name="change_verbergen">
		switch( verbergen);
		if( verbergen,
			copy( url, url_show);
		,
			copy( url, url_hide);
		);
	</action>

Source code

1
<layer name="skin_btn_info" style="skin_glow" url="info.png" align="bottom" x="-420" y="19" scale="0.50" onclick="change_verbergen();" url_show="info.png" url_hide="info.png" />
toosten has attached the following file:
  • tour.xml (6.29 kB - 64 times downloaded - latest: May 10th 2023, 3:56pm)

13

Wednesday, August 31st 2016, 9:36pm

Hallo toosten, darf ich Dich in meiner Danksagung erwähnen? ;-)

Das ist super! Es klappt so, wie ich es mir vorgestellt habe und wird die Tour dadurch noch benutzerfreundlicher machen, weil keiner die aufpoppenden Textballons automatisch ansehen muss.

DANKE!

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	<events onloadcomplete="init" />
	<action name="init">
		set(showtext, action(showtext_panox,'%%1','%%2') );
		set(verbergen, false);
	</action>
	
	<action name="showtext_panox">
		if( verbergen,
		,
			showtext_xml( %1, %2);
		);
	</action>
	
	<action name="change_verbergen">
		switch( verbergen);
		if( verbergen,
			copy( url, url_show);
		,
			copy( url, url_hide);
		);
	</action>


Und so eine Lösung bedarf schon einigen Vorwissens und Könnens! Ich freue mich über Deine Hilfsbereitschaft! Vielleicht kann dieser Weg auch anderen bei ihren Projekten nützen.


Grüße

Harald

This post has been edited 1 times, last edit by "panox" (Aug 31st 2016, 10:16pm)