You are not logged in.

1

Tuesday, December 27th 2011, 4:21pm

Combobox not working, need help

I have created a tour and trying to use the Combobox for navigation. I can't manage to make it work, please help! My xml is as bellow —

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
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
<krpano version="1.0.8.14" onstart="startup();">
	<!-- vtour.xml template krpano tools version 1.0.8.14 -->


	<action name="startup">
		<!-- load the first scene -->
		loadscene(get(scene[0].name), null, MERGE);

		<!-- build thumbnails when there is more than one scene (remove the line below to remove the thumbnails) -->
		if(scene.count GT 1, buildthumbs(); );
	</action>


	<!-- disable the default progress bar -->
	<progress showload="none" showwait="none" />


	<!-- hotspot styles (for Flash and HTML5) -->
	<style name="hotspot_ani_black"
	       url="hotspots/hotspot_ani_black_64x64x20.png"
	       crop="0|0|64|64"
	       framewidth="64" frameheight="64" frame="0" lastframe="19"
	       onloaded="hotspot_animate();"
	       altonloaded="if(isphone, mul(scale,2)); onloaded();"
	       />

	<style name="hotspot_ani_white"
	       url="hotspots/hotspot_ani_white_64x64x20.png"
	       crop="0|0|64|64"
	       framewidth="64" frameheight="64" frame="0" lastframe="19"
	       onloaded="hotspot_animate();"
	       altonloaded="if(isphone, mul(scale,2)); onloaded();"
	       />

	<action name="hotspot_animate">
		inc(frame,1,get(lastframe),0);
		mul(ypos,frame,frameheight);
		txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
		delayedcall(0.03, if(loaded, hotspot_animate() ) );
	</action>
	
	<!-- combobox plugin -->
	<plugin name="cb"
        url="%SWFPATH%/plugins/combobox.swf"
        alturl="%SWFPATH%/plugins/combobox.js"
        align="leftbottom" x="10" y="10"
        onloaded="fillbox();"
        />

	<action name="fillbox">       
    addIdItem(item1, 'Dinning', trace(item1 clicked) );
    addIdItem(item2, 'Living', trace(item2 clicked) );
    addIdItem(item3, 'Bar', trace(item3 clicked) );
    addIdItem(item4 'Kitchen', trace(item4 clicked) );
    addIdItem(item5, 'Deck', trace(item5 clicked) );
    addIdItem(item6, 'Master Bed', trace(item6 clicked) );
    addIdItem(item7, 'Bath', trace(item7 clicked) );
    addIdItem(item8, 'Guest', trace(item8 clicked) );
    addIdItem(item9, 'Natasha', trace(item9 clicked) );
    addIdItem(item10, 'Studio', trace(item10 clicked) );
	</action>
	



	<!-- scenes -->

	<scene name="scene_Dinning" title="Dinning" onstart="" thumburl="panos/Dinning.tiles/thumb.jpg">
	
		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" limitview="auto" />

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

		<image type="CUBE" multires="true" tilesize="587" progressive="false">
			<level tiledimagewidth="2935" tiledimageheight="2935">
				<cube url="panos/Dinning.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1468" tiledimageheight="1468">
				<cube url="panos/Dinning.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="734" tiledimageheight="734">
				<cube url="panos/Dinning.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Dinning.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Dinning.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>
	
	
	<scene name="scene_Living" title="Living" onstart="" thumburl="panos/Living.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="587" progressive="false">
			<level tiledimagewidth="2935" tiledimageheight="2935">
				<cube url="panos/Living.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1468" tiledimageheight="1468">
				<cube url="panos/Living.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="734" tiledimageheight="734">
				<cube url="panos/Living.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Living.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Living.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>
	
	<scene name="scene_Bar" title="Bar" onstart="" thumburl="panos/Bar.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="532" progressive="false">
			<level tiledimagewidth="2927" tiledimageheight="2927">
				<cube url="panos/Bar.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1464" tiledimageheight="1464">
				<cube url="panos/Bar.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="732" tiledimageheight="732">
				<cube url="panos/Bar.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Bar.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Bar.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>

<scene name="scene_Kitchen" title="Kitchen" onstart="" thumburl="panos/Kitchen.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="489" progressive="false">
			<level tiledimagewidth="2934" tiledimageheight="2934">
				<cube url="panos/Kitchen.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1467" tiledimageheight="1467">
				<cube url="panos/Kitchen.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="734" tiledimageheight="734">
				<cube url="panos/Kitchen.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Kitchen.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Kitchen.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>
	
	
	<scene name="scene_Deck" title="Deck" onstart="" thumburl="panos/Deck.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="733" progressive="false">
			<level tiledimagewidth="2932" tiledimageheight="2932">
				<cube url="panos/Deck.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1466" tiledimageheight="1466">
				<cube url="panos/Deck.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="733" tiledimageheight="733">
				<cube url="panos/Deck.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Deck.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Deck.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>
	
	
	<scene name="scene_Master Bed" title="Master Bed" onstart="" thumburl="panos/Master Bed.tiles/thumb.jpg">

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

		<preview url="panos/Master Bed.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="732" progressive="false">
			<level tiledimagewidth="2928" tiledimageheight="2928">
				<cube url="panos/Master Bed.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1464" tiledimageheight="1464">
				<cube url="panos/Master Bed.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="732" tiledimageheight="732">
				<cube url="panos/Master Bed.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Master Bed.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Master Bed.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>
	

	<scene name="scene_Bath" title="Bath" onstart="" thumburl="panos/Bath.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="587" progressive="false">
			<level tiledimagewidth="2935" tiledimageheight="2935">
				<cube url="panos/Bath.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1468" tiledimageheight="1468">
				<cube url="panos/Bath.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="734" tiledimageheight="734">
				<cube url="panos/Bath.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Bath.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Bath.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>




	<scene name="scene_Guest" title="Guest" onstart="" thumburl="panos/Guest.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="532" progressive="false">
			<level tiledimagewidth="2926" tiledimageheight="2926">
				<cube url="panos/Guest.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1463" tiledimageheight="1463">
				<cube url="panos/Guest.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="732" tiledimageheight="732">
				<cube url="panos/Guest.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Guest.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Guest.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>



	<scene name="scene_Natasha" title="Natasha" onstart="" thumburl="panos/Natasha.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="591" progressive="false">
			<level tiledimagewidth="2955" tiledimageheight="2955">
				<cube url="panos/Natasha.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1478" tiledimageheight="1478">
				<cube url="panos/Natasha.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="739" tiledimageheight="739">
				<cube url="panos/Natasha.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Natasha.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Natasha.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>


	<scene name="scene_Studio" title="Studio" onstart="" thumburl="panos/Studio.tiles/thumb.jpg">

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

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

		<image type="CUBE" multires="true" tilesize="730" progressive="false">
			<level tiledimagewidth="2920" tiledimageheight="2920">
				<cube url="panos/Studio.tiles/l3_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1460" tiledimageheight="1460">
				<cube url="panos/Studio.tiles/l2_%s_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="730" tiledimageheight="730">
				<cube url="panos/Studio.tiles/l1_%s_%0v%0h.jpg" />
			</level>
			<mobile>
				<cube url="panos/Studio.tiles/mobile_%s.jpg" />
			</mobile>
			<tablet>
				<cube url="panos/Studio.tiles/tablet_%s.jpg" />
			</tablet>
		</image>

		<!-- place hotspots here -->

		<!-- example hotspot:
		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="0"
		         atv="0"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene('insert-scene-name',null,MERGE,BLEND(1));"
		         />
		-->

	</scene>




	<!-- thumbnail actions begin (remove the 'buildthumbs()' call in the onstart event to remove the thumbs) -->
	<action name="buildthumbs">
		if(%1 != NEXT, set(i,0));
		if(i LT scene.count,
			copy(thumb, scene[get(i)].thumburl);
			txtadd(thumbname,'thumb_',get(i));
			addplugin(get(thumbname));
			set(plugin[get(thumbname)].url, get(thumb));
			set(plugin[get(thumbname)].keep, true);
			set(plugin[get(thumbname)].align, leftbottom);
			set(plugin[get(thumbname)].width,  40);
			set(plugin[get(thumbname)].height, 40);
			mul(plugin[get(thumbname)].x, i,3);
			mul(plugin[get(thumbname)].y, i,3);
			add(plugin[get(thumbname)].x, 5);
			add(plugin[get(thumbname)].y, 5);
			copy(plugin[get(thumbname)].xsmall, plugin[get(thumbname)].x);
			copy(plugin[get(thumbname)].ysmall, plugin[get(thumbname)].y);
			add(plugin[get(thumbname)].zorder, 100, i);
			set(plugin[get(thumbname)].effect, glow(0xFFFFFF,1.0,2,10000));
			set(plugin[get(thumbname)].jsborder, '1px solid #FFFFFF');
			copy(plugin[get(thumbname)].thumbpos, i);
			set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );
			set(plugin[get(thumbname)].onclick, openthumbs() );
			inc(i);
			buildthumbs(NEXT);
		  );
	</action>

	<action name="openthumb">
		if(%2 != NEXT,
			set(pos,0);
			copy(curpos, plugin[%1].thumbpos);
			set(xdst, 0);
			set(ydst, 0);
		  );

		if(pos LT curpos,
			inc(pos);
			inc(ydst,90);
			sub(ymax, stageheight, 100);
			if(ydst GT ymax, inc(xdst,90);set(ydst,0); );
			openthumb(%1,NEXT);
		  ,
			add(xdst,10);
			add(ydst,10);
			tween(plugin[%1].x, get(xdst) );
			tween(plugin[%1].y, get(ydst) );
			tween(plugin[%1].width, 80);
			tween(plugin[%1].height, 80);
		  );
	</action>

	<action name="closethumb">
		tween(plugin[%1].x, get(plugin[%1].xsmall));
		tween(plugin[%1].y, get(plugin[%1].ysmall));
		tween(plugin[%1].width, 40);
		tween(plugin[%1].height, 40);
	</action>

	<action name="openthumbs">
		if(%1 != NEXT,
			set(i,0);
			set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
		  );

		if(i LT scene.count,
			txtadd(thumbname,'thumb_',get(i));
			openthumb(get(thumbname));
			set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
			inc(i);
			openthumbs(NEXT);
		  );
	</action>

	<action name="closethumbs">
		if(%1 != NEXT, set(i,0));
		if(i LT scene.count,
			txtadd(thumbname,'thumb_',get(i));
			closethumb(get(thumbname));
			set(plugin[get(thumbname)].onclick, openthumbs() );
			inc(i);
			closethumbs(NEXT);
		  );
	</action>
	<!-- thumbnail actions end -->


</krpano>

2

Tuesday, December 27th 2011, 8:42pm

Never mind I figured it out myself. ;-)

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

3

Friday, December 30th 2011, 3:34pm

Hi

I have got to the same point but I can't figure it out.

What is the answer?

The examples on the site are pre 10.8.14 without the alturl file.

Just find any examples.

Steve

4

Friday, December 30th 2011, 8:23pm

Hi zzzoneHere is what worked for me

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!-- combobox plugin -->
	!-- use differnt styles to set different combobox styles/sizes for differnt devices (in this example all default values were used) -->
	<style name="combobox" devices="desktop|flash" url="%SWFPATH%/plugins/combobox.swf" alturl="%SWFPATH%/plugins/combobox_source.js" native="false" />
	<style name="combobox" devices="iphone"        url="%SWFPATH%/plugins/combobox.js" cbdesignscale="auto" cbfont="Arial" cbfontsize="auto" cbfontstyle="normal" cbpadding="8" itemfont="Arial" itemfontsize="16" itemfontstyle="normal" itempadding="10" />
	<style name="combobox" devices="ipad"          url="%SWFPATH%/plugins/combobox.js" cbdesignscale="auto" cbfont="Arial" cbfontsize="auto" cbfontstyle="normal" cbpadding="8" itemfont="Arial" itemfontsize="16" itemfontstyle="normal" itempadding="10" />

	<plugin name="cb" style="combobox" align="lefttop" x="10" y="10" width="90" keep="true">       
    	<item name="scene_Dinning" caption="Dinning" onclick="loadscene(scene_Dinning,null,MERGE,BLEND(1));" />
    	<item name="scene_Living" caption="Living" onclick="loadscene(scene_Living,null,MERGE,BLEND(1));" />
    	<item name="scene_Bar" caption="Bar" onclick="loadscene(scene_Bar,null,MERGE,BLEND(1));" />
    	<item name="scene_Kitchen" caption="Kitchen" onclick="loadscene(scene_Kitchen,null,MERGE,BLEND(1));" />
    	<item name="scene_Deck" caption="Deck" onclick="loadscene(scene_Deck,null,MERGE,BLEND(1));" />
    	<item name="scene_Master Bed" caption="Master Bed" onclick="loadscene(scene_Master Bed,null,MERGE,BLEND(1));" />
    	<item name="scene_Bath" caption="Bath" onclick="loadscene(scene_Bath,null,MERGE,BLEND(1));" />
    	<item name="scene_Guest" caption="Guest" onclick="loadscene(scene_Guest,null,MERGE,BLEND(1));" />
    	<item name="scene_Natasha" caption="Natasha" onclick="loadscene(scene_Natasha,null,MERGE,BLEND(1));" />
    	<item name="scene_Studio" caption="Studio" onclick="loadscene(scene_Studio,null,MERGE,BLEND(1));" />
	</plugin>

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

5

Friday, December 30th 2011, 8:57pm

Thank you so much.

Steve

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

6

Saturday, December 31st 2011, 3:00pm

Actually I am not finding this perfect.

I changed comboxbox_source.js to combobox.js which fixed that.

But more importantly, when the scene is changed via a hotspot, the combobox label doesn't change.

There is another thread on this subject with

<events name="firstsceneonly" onloadcomplete="plugin[cb].selectitem('item1');"/>

and that doesn't help either.

Help please *confused*

Steve

7

Saturday, December 31st 2011, 3:19pm

Steve

I am in same situation look here

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

8

Saturday, December 31st 2011, 6:01pm

Hi Yoshiharra

My solution prior to 1.0.8.14 was to create an onstart="action(startscene);"

Which was alway a pain when using superb VTOUR, but then having to copy and paste something like this into each SCENE

<scene name="scene_xxx" title="xxxxxx" onstart="action(startscene);" thumburl="xxxxxxxxxx/thumb.jpg">

<action name="startscene">
plugin[box].selectIdItem(1);
</action>

The new combobox solution I was hoping would be ideal, working with the ipad etc, on not needing code in each of the Scenes.

Maybe that is not the case but I couldn't get the previous suggested solution to work:-

<events name="firstsceneonly" onloadcomplete="plugin[combobox].selectitem('xxx');"/>


Steve

9

Sunday, January 1st 2012, 3:32pm

Steve

Didi you ask Klaus?

Klaus, hope you are reading this, please help.

10

Sunday, January 1st 2012, 4:36pm

Here is a very complex example from Michel.

House Spain

You don't have to use such complex coding but you do need to change the combo box in your loadscene action.

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

11

Sunday, January 1st 2012, 11:40pm

Hi Jarredja

Thank you for your input but that post you refer to is back in 2009 and I like the VTOUR script for an efficient workflow.

I was hoping then simply to amend a template to include the new 1.0.8.14 combobox code

and add a onstart action to sort the combobox label like I did for 1.0.8.12

I just can't get the new combobox label to change if you change scene using a hotspot say.

Sorry my actionscript knowledge is inadequate to do anything other than 'cherry pick' the bits I want out of the examples provided to get it to do what I want!!!! *g*

Steve

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

12

Sunday, January 1st 2012, 11:44pm

Steve

Didi you ask Klaus?

Klaus, hope you are reading this, please help.


Hi Yoshiharra, no I didn't ask Klaus. Didn't think he was ever very far from this forum.

I am sure it will be business as usual very soon!! *g*

Tuur

Sage

Posts: 3,194

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

13

Monday, January 2nd 2012, 12:43am

Hi,

after re-reading your post again i would say:

do as michel wrote in Jarredja's suggestion:

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
<action name="setupitems_French">
<plugin name="combobox"
        url="%SWFPATH%/plugins/combobox.swf" 
        align="lefttop" 
        x="10" 
        y="70" 
        width="120"
        keep="true"
        onloaded="action(setupitems_Spanish);"
        />

<action name="setupitems_Spanish">
    plugin[combobox].removeall();
    plugin[combobox].additem(Spanish_Scene_1, action(load1); );
    plugin[combobox].additem(Spanish_Scene_2, action(load2); );
    plugin[combobox].additem(Spanish_Scene_3, action(load3); );
    plugin[combobox].additem(Spanish_Scene_4, action(load4); );
    set(var_Item_1,Spanish_Scene_1);
    set(var_Item_2,Spanish_Scene_2);
    set(var_Item_3,Spanish_Scene_3);
    set(var_Item_4,Spanish_Scene_4);
action(Item_Current_Pano);
</action>

    plugin[combobox].removeall();
    plugin[combobox].additem(French_Scene_1, action(load1); );
    plugin[combobox].additem(French_Scene_2, action(load2); );
    plugin[combobox].additem(French_Scene_3, action(load3); );
    plugin[combobox].additem(French_Scene_4, action(load4); );
    set(var_Item_1,French_Scene_1);
    set(var_Item_2,French_Scene_2);
    set(var_Item_3,French_Scene_3);
    set(var_Item_4,French_Scene_4);
action(Item_Current_Pano);
</action>

<action name="Item_Current_Pano">
    if(var_Current_Pano == Item_1, plugin[combobox].selectitem(get(var_Item_1)));
    if(var_Current_Pano == Item_2, plugin[combobox].selectitem(get(var_Item_2)));
    if(var_Current_Pano == Item_3, plugin[combobox].selectitem(get(var_Item_3)));
    if(var_Current_Pano == Item_4, plugin[combobox].selectitem(get(var_Item_4)));
</action>

<action name="load1">
set(plugin[spotx].x,293);
set(plugin[spotx].y,87);
set(plugin[radar].x,293);
set(plugin[radar].y,87);
loadpano(1.xml,null,KEEPALL,BLEND(2));
set(plugin[radar].heading,10);
plugin[combobox].selectitem(get(var_Item_1));
    set(var_Current_Pano,Item_1);
</action>


study it, and clean it up for yourself, maybe just one language.
http://www.krpano.com/forum/wbb/index.ph…D=7969#post7969
and try to understand what happens.
You have to change it a bit for scenes though.
maybe have some fun with get scene name etc.. *thumbup*

cleaned up a bit:

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
<plugin name="combobox"
        url="%SWFPATH%/plugins/combobox.swf" 
        align="lefttop" 
        x="10" 
        y="70" 
        width="120"
        keep="true"
        onloaded="action(setupitems);"
        />

<action name="setupitems">
    plugin[combobox].removeall();
    plugin[combobox].additem(Scene_1, action(load1); );
    plugin[combobox].additem(Scene_2, action(load2); );
    plugin[combobox].additem(Scene_3, action(load3); );
    plugin[combobox].additem(Scene_4, action(load4); );
    set(var_Item_1,Scene_1);
    set(var_Item_2,Scene_2);
    set(var_Item_3,Scene_3);
    set(var_Item_4,Scene_4);
action(Item_Current_Pano);
</action>

   
<action name="Item_Current_Pano">
    if(var_Current_Pano == Item_1, plugin[combobox].selectitem(get(var_Item_1)));
    if(var_Current_Pano == Item_2, plugin[combobox].selectitem(get(var_Item_2)));
    if(var_Current_Pano == Item_3, plugin[combobox].selectitem(get(var_Item_3)));
    if(var_Current_Pano == Item_4, plugin[combobox].selectitem(get(var_Item_4)));
</action>

<action name="load1">

loadpano(1.xml,null,KEEPALL,BLEND(2));
plugin[combobox].selectitem(get(var_Item_1));
    set(var_Current_Pano,Item_1);
</action>


maybe you can do something with
get(scene[get(i)].name)

*thumbup*

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

14

Monday, January 2nd 2012, 5:33am

Hi Tuur

Thank you for your input. You are far more of an expert here than me so forgive me but this seems so complex and far from yoshiharra's solution:-

here

that works on all devices, only failing to change the combobox label when using a hotspot.

Is there really no simpler way to achieve this? *confused*

zzzone

Trainee

Posts: 64

Location: Bristol

Occupation: Photographer

  • Send private message

15

Monday, January 2nd 2012, 7:30am

Found the answer I think. One that is a simple addition to the VTOUR script. Most of this can be added into the vtour.xml template.

It is a pity I cannot find a way to add startscene bit in to the vtour-xxx.config file as a template.

Is it difficult to take a droplet apart and reconfigure to suit?

Anyway please see below.

<plugin name="cb" style="combobox" keep="true">
<item name="item1" caption="1. " onclick="loadscene(scene_01,null,MERGE,BLEND(1));" />
<item name="item2" caption="2. " onclick="loadscene(scene_02,null,MERGE,BLEND(1));" />
<item name="item3" caption="3. " onclick="loadscene(scene_03,null,MERGE,BLEND(1));" />
<item name="item4" caption="4. " onclick="loadscene(scene_04,null,MERGE,BLEND(1));" />
<item name="item5" caption="5. " onclick="loadscene(scene_05,null,MERGE,BLEND(1));" />
<item name="item6" caption="6. " onclick="loadscene(scene_06,null,MERGE,BLEND(1));" />
<item name="item7" caption="7. " onclick="loadscene(scene_07,null,MERGE,BLEND(1));" />
<item name="item8" caption="8. " onclick="loadscene(scene_08,null,MERGE,BLEND(1));" />
<item name="item9" caption="9. " onclick="loadscene(scene_09,null,MERGE,BLEND(1));" />
</plugin>

<style name="combobox" devices="desktop|flash" rowcount="10" align="righttop" x="18" y="85" width="145" zorder="2" url="%SWFPATH%/plugins/combobox.swf" alturl="%SWFPATH%/plugins/combobox.js" native="false" />
<style name="combobox" devices="iphone" align="righttop" x="18" y="18" width="245" zorder="2" url="%SWFPATH%/plugins/combobox.js" cbdesignscale="auto" cbfont="Arial" cbfontsize="auto" cbfontstyle="normal" cbpadding="8" itemfont="Arial" itemfontsize="16" itemfontstyle="normal" itempadding="10" />
<style name="combobox" devices="ipad" align="righttop" x="18" y="80" width="145" zorder="2" url="%SWFPATH%/plugins/combobox.js" cbdesignscale="auto" cbfont="Arial" cbfontsize="auto" cbfontstyle="normal" cbpadding="8" itemfont="Arial" itemfontsize="16" itemfontstyle="normal" itempadding="10" />

<scene name="scene_01" title="01" onstart="action(startscene);" thumburl="panos/01.tiles/thumb.jpg">

<action name="startscene">
plugin[cb].selectIdItem(item1);
</action>

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

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

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


</scene>


<scene name="scene_02" title="02" onstart="action(startscene);" thumburl="panos/02.tiles/thumb.jpg">

<action name="startscene">
plugin[cb].selectIdItem(item2);
</action>

etc etc
.................

16

Monday, January 2nd 2012, 11:39am

that works on all devices, only failing to change the combobox label when using a hotspot.

Is there really no simpler way to achieve this? *confused*


Thanks for pointing to the real issue here *smile*

dsullyfoto

Beginner

Posts: 15

Location: Tampa, FL

  • Send private message

17

Friday, December 7th 2012, 6:27pm

Combobox Error - "Download of combobox.swf failed"

I keep getting download of combobox.swf failed. Any ideas? I have the .js and .swf files in the plugins folder and I have used the basic script that the example gives in my xml. Is this correct? I am just trying to create a drop down menu for the different scenes.

dsullyfoto

Beginner

Posts: 15

Location: Tampa, FL

  • Send private message

18

Sunday, December 9th 2012, 1:59am

Solved

Figured it out thank you.

Similar threads