Sie sind nicht angemeldet.

1

Mittwoch, 21. April 2010, 13:55

Textfield does not work with the SCENE node

Hi.

I faced a strange problem. I want to put the textfield into my virtual tour, but could not sucseed in it. I paste a code from the Textfield sample from the krpano 1.0.7 folder into a new file. When I simply add a

Quellcode

1
2
3
		<image type="SPHERE">
			<sphere url="../../../Scenes/Velux/scene1.jpg" />
		</image>

instead of

Quellcode

1
2
3
	<view fisheyefovlink="1.5" />
	
	<preview type="grid(cube,32,32,256,0x000000,0x778899,0x000000);" details="8" />

everything works fine.

But when I add the SCENE tags, the desired OPEN HTML TEXTFIELD button disapears. Not only the button, but the texfield does not work at all. I tried to associate the "htmltext" plugin with the other button, but it does not appear, once the scene tag is used.

I use krpano 1.0.8. Maybe that is the issue?

I attach the code, that does not work for me. I can not imagine what is disturbing there to the texfield to appear:

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
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
<krpano version="1.0.8" onstart="action(start)">

	<action name="start">

    	<!-- load 1. scene on start -->
    	loadscene(scene1, null, MERGE);
	</action>
	   
	<scene name="scene1" onstart="action(startscene);">

		<action name="startscene">
			
		</action>

		<view hlookat="72" vlookat="0" fov="75" fovmax="90" /> 

		<image type="SPHERE">
			<sphere url="../../../Scenes/Velux/scene1.jpg" />
		</image>

	</scene>

	<data name="buttontext">
		<p align="center">
			<font face="arial" size="+4">
				<b><i>OPEN HTML TEXTFIELD</i></b>
			</font>
		</p>
	</data>
	
	<plugin name="button" url="%SWFPATH%/plugins/textfield.swf" 
	    	align="center" width="200" height="30" x="0" y="150" children="false"
	    	html="data:buttontext"
	    	background="false"
	    	textglow="4"
	    	textglowcolor="0xFFFFFF"
	    	textshadow="3"
	    	autosize="center"
	    	onclick="action(show_html_field);"
	    	/>
	    	
	<action name="show_html_field">
		set(plugin[button].enabled,false);
		set(plugin[htmltext].y,-1500);
		tween(plugin[button].alpha,0,,,set(plugin[button].visible,false));
		tween(plugin[htmltext].alpha,1,0);
		tween(plugin[htmltext].textblur,0,0);
		tween(plugin[htmltext].blur,0,0);
		set(plugin[htmltext].visible,true);
		set(plugin[htmltext].enabled,true);
		tween(plugin[htmltext].y,0);
	</action>
	
	
	<action name="showbutton">
		set(plugin[button].visible,true);
		set(plugin[button].enabled,true);
		tween(plugin[button].alpha,1);
	</action>		

	<plugin name="htmltext" url="%SWFPATH%/plugins/textfield.swf" 
	    	align="center" width="500" height="300" x="0" y="-1100" visible="false"
	    	html="data:html1"
	    	css="data:css1"
	    	roundedge="0"
	    	borderwidth="1"
	    	bordercolor="0xFFFFFF"
	    	backgroundcolor="0xFFFFFF"
	    	selectable="false"
	    	shadow="5"
	    	autosize="center"
	    	/>

	<plugin name="htmltext2" url="%SWFPATH%/plugins/textfield.swf" 
	    	align="righttop" width="250" height="100" x="20" y="20"
	    	html="data:html2"
	    	css="data:css2"
	    	borderwidth="0"
	    	bordercolor="0xFF0000"
	    	backgroundcolor="0xFFFFFF"
	    	alpha="0.0"
	    	blur="8"
	    	textblur="8"
	    	glow="6"
	    	glowcolor="0xFFFFFF"
	    	shadow="5"
	    	autosize="center"
	    	visible="false"
	    	/>	    	
	
	<action name="move">
		plugin[%1].changeorigin(lefttop,lefttop);
		tween(plugin[%1].x,0,1,easeoutquad);
		tween(plugin[%1].y,0,1,easeoutquad,action(move2,%1));
	</action>
	
	<action name="move2">
		plugin[%1].changeorigin(rightbottom,rightbottom);
		tween(plugin[%1].x,0,1,easeoutquad);
		tween(plugin[%1].y,0,1,easeoutquad,action(moveback,%1));
	</action>
	
	<action name="moveback">
		plugin[%1].changeorigin(center,center);
		tween(plugin[%1].x,0,1,easeoutquad);
		tween(plugin[%1].y,0,1,easeoutquad);
	</action>
	
	<action name="hidewindow">
		set(plugin[%1].enabled,false);
		tween(plugin[%1].alpha,0);
		tween(plugin[%1].blur,20);
		tween(plugin[%1].textblur,20,,,set(plugin[%1].visible,false));
	</action>
	
	<action name="hidewindow2">
		set(enabled,false);
		tween(alpha,0);
		tween(blur,20);
		tween(textblur,20,,,set(visible,false));
	</action>
	
	<action name="show_html_field2">
		set(plugin[htmltext2].enabled,true);
		tween(plugin[htmltext2].blur,8,0);
		tween(plugin[htmltext2].textblur,8,0);
		set(plugin[htmltext2].blur,8);
		set(plugin[htmltext2].textblur,8);
		set(plugin[htmltext2].visible,true);
		tween(plugin[htmltext2].blur,0);
		tween(plugin[htmltext2].textblur,0);
		tween(plugin[htmltext2].alpha,0.8);
	</action>	
	
	<action name="loadpano">
		action(hidewindow,htmltext);
		action(showbutton);
		loadpano(%SWFPATH%/examples/sphere/sphere_example.xml,null,KEEPBASE,BLEND(1));
	</action>
	
	<data name="html1">
		<p align="center">
			<font face="times" size="+4">
				<b>Hello from Actionscript HTML</b>
			</font>
		</p>
		
		<a href="event:action(loadpano);">
			<img src="image.jpg" />
		</a>
		
		styles test:<br/>
		<b>bold</b><br/>
		<i>italic</i><br/>
		<u>underlined</u><br/>
		<br/>
		
		links test:<br/>
		<a href="http://www.krpano.com">open krpano site</a><br/>
		<a href="event:lookto(0,0,130);lookto(90,0,150);">do some lookto actions</a><br/>
		<a href="event:action(move,htmltext);">click to move field</a><br/>
		<a href="event:action(show_html_field2);">open second field</a><br/>
		<br/>
		
		color test:<br/>
		<font color="#FF0000">red </font><font color="#00FF00">green </font><font color="#0000FF">blue</font><br/>
		<br/>
		<br/>
		<br/>
		
		list test:<br/>
		<li>
			<ul>list1</ul><br/>
			<ul>list2</ul><br/>
			<ul>list3</ul><br/>
		</li>
		
		<p align="left">
			left align test left align test left align test left align test left align test<br/>
			left align testleft align testleft align test<br/>
		</p>
		
		<p align="center">
			center align test center align test center align test center align test center align test<br/>
			center align test center align test center align test<br/>
		</p>
		
		<p align="right">
			right align test right align test right align test right align test right align test<br/>
			right align test right align test right align test<br/>
		</p>
		
		<p align="center">
			<font size="+4">
				<a href="event:action(hidewindow,htmltext);action(showbutton);">close window</a><br/>
			</font>
		</p>
	</data>	    	
	
	<data name="css1">
		a   	{ text-decoration:underline;  color:#110088;  font-weight:bold; }
		a:hover { color:#885500; }
	</data>
	
	<data name="css2">
		<include url="externdata.css" />
	</data>
	
	<data name="html2">
		<include url="externdata.html" />
	</data>
	


	<plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" />
	<plugin name="options" url="%SWFPATH%/plugins/options.swf" keep="true" />
	
	<!-- set the path to the default lensflare image -->
	<lensflareset name="DEFAULT" url="%SWFPATH%/plugins/krpano_default_flares.jpg" />


</krpano>

2

Mittwoch, 21. April 2010, 14:00

Quellcode

1
2
3
......
keep="true"
......


put on every plugin textfield ;-)

3

Mittwoch, 21. April 2010, 14:47

Thanks

Thanks a lot, Job. 1!

It works now as desired. Still there were some issues that I could not understand and explain hot did I make it work, but without your hint I would't go any further at all!

4

Mittwoch, 21. April 2010, 15:08

If you don't put plugin on a scene, you have to set keep on true to see this plugin in all scenes

http://krpano.com/docu/xml/#plugin