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

Monday, November 9th 2009, 9:10pm

image textbox

hello !

(sorry for my english :-) but i try

i'm working for art galery so i want put few hotspots in my spherical panorama (area hotspot) to describe many paintings with image & text
i want to open the "informations windows" directly in my panorama

something like that : http://krpano.com/examples/textfield/
but in this example, it's not a hotspot !

I think I have to generate 1 "external.html" file for 1 painting content descriptive image & text info
but how include this into panorama on hotspot ?

i think you have open thread about this but i didn't find it !

merci beaucoup ! *smile*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Monday, November 9th 2009, 9:43pm

Hi brice,

Simply, make an hospot and add the action() to open your "informations windows" in the onclick...
Example code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	<hotspot name="hs0"
	     	keep="false"
	     	visible="true" enabled="true" handcursor="true" capture="true" children="true"
 	     	zorder="0"
	     	fillcolor 	="0xffffff" fillalpha 	="0.10" borderwidth 	="2.0" bordercolor 	="0xffffff" borderalpha 	="0.20"
	     	fillcolorhover="0xffffff" fillalphahover="0.20" borderwidthhover="4.0" bordercolorhover="0xffffff" borderalphahover="0.80"
	     	fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
	     	onover=""
	     	onhover=""
	     	onout=""
	     	ondown=""
	     	onup=""
	     	onclick="action(show_html_field);"
		>
		<point ath="-15.0000" atv="-15.0000" />
		<point ath=" 15.0000" atv="-15.0000" />
		<point ath=" 15.0000" atv=" 15.0000" />
		<point ath="-15.0000" atv=" 15.0000" />
	</hotspot>

You can add this code into the textfield example that comes with the krpano 1.0.7 downloaded file to see the result... The hotspot will open the same textfield as the text OPEN HTML TEXTFIELD do.

3

Monday, November 9th 2009, 10:26pm

hi Michel



first, thank's to understaind my english/french mix language !



if i follow your advice i have :


"WARNING: not local trusted - ExternalInterface disabled!

ERROR: action not found: externdata.html"


"externdata.html" & my krpano textfield "mypanorama.xml" files are into the same filed

? *cry*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Monday, November 9th 2009, 10:48pm

Hi brice,

Have you downloaded the krpano 1.0.7 ?
Into this download there is some examples... one of them is the one you refers before http://krpano.com/examples/textfield/ . So you can view the code and make some change to learn how it work...

If you put the hotspot into the textfield example, you will see it in the middle of the screen... click on it ... it display the same textfield as the text OPEN HTML TEXTFIELD do.

Try it. C'est dur la culture ;-) .

SAlut.

5

Monday, November 9th 2009, 11:56pm

Michel,

thank's but I win when I "play" with all values like :
<action name="loadpano1">
lookto(88.517,1.097,6,smooth());
loadpano(next.xml,null,MERGE,BLEND(1));
lookat(180.8,1.9,22);
wait(blend);
lookto(263.711,0.982,87,smooth(100,20,50));"
</action>


no problem for this actions but I don't understaind how work this action :
onclick="action(show_html_field)

I think i have to add another atribute like "plugin" or "date"
...

what else !

I try again... 4 hours later

I hope I'll be back !

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

6

Tuesday, November 10th 2009, 12:10am

Hi brice,

Here is the textfield code with the hotspot added at the beginning:

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
<krpano version="1.0.7">

<hotspot name="hs0"
 keep="false"
 visible="true" enabled="true" handcursor="true" capture="true" children="true"
  zorder="0"
 fillcolor ="0xffffff" fillalpha ="0.10" borderwidth ="2.0" bordercolor ="0xffffff" borderalpha ="0.20"
 fillcolorhover="0xffffff" fillalphahover="0.20" borderwidthhover="4.0" bordercolorhover="0xffffff" borderalphahover="0.80"
 fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"
 onover=""
 onhover=""
 onout=""
 ondown=""
 onup=""
 onclick="action(show_html_field);"
>
<point ath="-15.0000" atv="-15.0000" />
<point ath=" 15.0000" atv="-15.0000" />
<point ath=" 15.0000" atv=" 15.0000" />
<point ath="-15.0000" atv=" 15.0000" />
</hotspot>

<view fisheyefovlink="1.5" />

<preview type="grid(cube,32,32,256,0x000000,0x778899,0x000000);" details="8" />

<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>

</krpano>

The Hotspot call the action(show_html_field) when onclick....
The plugin button does the same.... call the action(show_html_field) when onclick....
The action(show_html_field) looks as follow:

Source code

1
2
3
4
5
6
7
8
9
10
11
<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>

Basically he makes the plugin button disappear and makes the plugin htmltext appear...

There is many other actions defined in this example...
Just take a look and try to understand what call those actions and what they do. ;-) learning curve. *g*

Also, see here for textfield plugin doc: http://krpano.com/plugins/textfield/

SAlut.

7

Wednesday, November 11th 2009, 1:22pm

Michel,

thank's a lot
I try every day and un think i've found a part of solution !

i will come back soon to post my test link to show you my work !

asap !

thank's for your help
brice

8

Wednesday, November 11th 2009, 8:30pm

Visite expo musée ludique !

Michel !
i'm back !
few hours later...

http://www.visit-online.com/mba/les_modernes/vue_1/


give me your opinion !

thank's for your help
brice

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

9

Wednesday, November 11th 2009, 9:34pm

Hi brice,

Mon préféré c'est "Le Hammac" *smile* ....

Cool... You have done it *attention*

Some notes:
  • Your pano is really heavy and you are using multiresolution but with only one level...
  • Perhaps it will be cool to add some text intro to explain that the paintings are interactive...
  • The plugin[htmltext] has a height="800" and align="center"... this can be a problem for some one having a little screen (like me - 1024x768 ;-) )... I can not see the close link if i am not in Fullscreen...
  • Perhaps it can be good to stop the autorotate or freeze the view when the plugin[htmltext] is displayed...
Any way, you have done a good job. (1433 lines of code...oufff *g* )

SAlut.