Sie sind nicht angemeldet.

1

Dienstag, 11. Mai 2010, 21:02

Combobox for Simpleviewer Link

Hello
Is it possible to use combobox as a link to a Simpleviewer gallery?
actually my combo load 3 panos with a start action (onstart="action(start)") and i would like to create a fourth one for the simpleviewer gallery.
Thank You

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »jullian« (12. Mai 2010, 12:28)


2

Dienstag, 11. Mai 2010, 21:55

yes.

create and action that loads the simple viewer and call that action from the combobox.

3

Mittwoch, 12. Mai 2010, 08:55

Thank you vn2009, but i don't understand how to do with my code. I don't need plugin? Is there a thread with an example?

Many thanks for your help

RV

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »jullian« (12. Mai 2010, 12:28)


4

Donnerstag, 13. Mai 2010, 11:53

May be can you help me otherwise. I'm not so good with Krpano but i'm learning.

I've found two ways to use my combo:

The first with an Onstart, call a jpg and i don't find how to call the Simpleviewer xml.




Quellcode

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
<krpano version="1.0.8" onstart="action(start)">
	<!-- text style for startup info -->
	<textstyle name="infostyle" origin="top" edge="top" yoffset="20" textalign="center" background="false" border="false"  fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="1.0" fadetime="1.0" />


	<!-- combobox plugin -->
	<plugin name="box" url="%SWFPATH%/plugins/combobox.swf" preload="true"
	        keep="true"
	        align="lefttop" x="10" y="10" width="100" 
	        blendmode="layer" 
	        />
	        
	        
	<action name="start">
		plugin[box].addIdItem(1, 'Scene 1', loadscene(scene1, null, MERGE, BLEND(1)); );
        plugin[box].addIdItem(2, 'Scene 2', loadscene(scene2, null, MERGE, BLEND(1)); );
        plugin[box].addIdItem(3, 'Scene 3', loadscene(scene3, null, MERGE, BLEND(1)); );
        
        <!-- load 1. scene on start -->
        loadscene(scene1, null, MERGE);
	</action>


	<!-- scenes -->
	<!-- first scene/pano -->
	<scene name="scene1" onstart="action(startscene);">


		<action name="startscene">
			showtext('[b][i]scene 1[/i][/b]', infostyle);
			plugin[box].selectIdItem(1);
		</action>


		<view hlookat="-15" vlookat="-10" fov="90" />
		<image type="CUBESTRIP">
			<cubestrip url="pano1.jpg" />
		</image>
	</scene>




	<!-- second scene/pano-->
	<scene name="scene2" onstart="action(startscene);">


		<action name="startscene">
			showtext('[b][i]scene 2[/i][/b]', infostyle);
			plugin[box].selectIdItem(2);
		</action>


		<view hlookat="-110" vlookat="8" fov="100" />
		<image type="CUBESTRIP">
			<cubestrip url="pano2.jpg" />
		</image>
	</scene>





The second way is more classical…. plugin + action and call an xml…. but it doesn't work with my Simpleviewer xml:

Quellcode

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
<plugin name="combobox"
        url="%SWFPATH%/plugins/combobox.swf" 
        align="lefttop" 
        x="10" 
        y="10" 
        width="33%"
        keep="true"
        onloaded="action(setupitems);"
        />
	
<action name="setupitems">
    removeall();
    additem(Item 1, action(item1) );
    additem(Item 2, action(item2) );
</action>


<action name="item1">
    loadpano(pano1.xml);
</action>


<action name="item2">
    loadpano(pano2.xml);
</action>


Thank you

RV