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.

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

1

Thursday, September 17th 2009, 2:06am

textfield instead of graphic on a hotspot

I want a polygonal hotspot to have a textfield next to it.

I know how I would set this up as a plugin, with a new plugin for each hotspot.

What I want is to create it dynamically though an action for each hotspot, i.e. one plugin and many hotpspots.

Anyone any ideas?

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

2

Thursday, September 17th 2009, 5:59am

Ok, starting from the begining, how do you make a textfield a hotspot as stated in the documentation?

i.e give it ath/atv values?

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

3

Thursday, September 17th 2009, 6:00am

Hi viewinz,

I think doing something like this:

Source code

1
2
3
4
5
6
7
<plugin name="YourtextfielPlugin" .....  />

<hotspot name="hotspot1" ..........
  onclick="set(plugin[YourtextfielPlugin].html,some txt for hotspot1)";   />

<hotspot name="hotspot2" ..........
  onclick="set(plugin[YourtextfielPlugin].html,some txt for hotspot2)";   />


I have not tried but I think it will do the job.

Have you tried to use a textfield as distorted hotspot?
I have just made some tries ... but strange results ... *wacko*

Salut.

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

4

Thursday, September 17th 2009, 6:25am

I've tried that method but still can't work out how to place the textfield in the pano, rather than on the interface if you get what I mean.

How are you trying to use textfield as distorted hotspot? can I see your code?

Cheers for having a look.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

5

Thursday, September 17th 2009, 6:49am

Hi viewinz,

I just tried with textfield as hotspot... like this:

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
<hotspot name="textessai" url="%SWFPATH%/plugins/textfield.swf"
		width="100" height="20"
		ath="" atv=""
		html="[p]salut[/p]"
		css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
		backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
		autosize="center"
		/>
<hotspot name="hotspot1" ..........
		onover="set(hotspot[textessai].html,[p]some txt for hotspot1[/p]);
				set(hotspot[textessai].ath,10); 
				set(hotspot[textessai].atv,-10); 
				set(hotspot[textessai].visible,true); "
		onout="set(hotspot[textessai].visible,false); "
		onclick=""; 
		/>

<hotspot name="hotspot2" ..........
		onover="set(hotspot[textessai].html,[p]some txt for hotspot2[/p]);
				set(hotspot[textessai].ath,100); 
				set(hotspot[textessai].atv,-40); 
				set(hotspot[textessai].visible,true); "
		onout="set(hotspot[textessai].visible,false); "
		onclick=""; 
		/>


This way you have only 1 "hotspot textfield".
for each hotspot, onover makes the action to give the right html text , the position with ath and atv, and makes visible the "hotspot textfield".....
and onout makes the "hotspot textfield" invisible....

I think it is correct...

About ath and atv:
  • ath
    point at horizontal position in spherical coordinates (0 .. 360°)
  • atv
    point at vertical position in spherical coordinates (-90 .. +90°)
I hope this can make the job... tell me.. ;-)

Salut.

stevenChen

Beginner

Posts: 18

Location: beijing, china

  • Send private message

6

Wednesday, April 6th 2016, 8:00am

Hi viewinz,

I just tried with textfield as hotspot... like this:

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
<hotspot name="textessai" url="%SWFPATH%/plugins/textfield.swf" 
		width="100" height="20"
		ath="" atv=""
		html="[p]salut[/p]"
		css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
		backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
		autosize="center"
		/>
<hotspot name="hotspot1" ..........
		onover="set(hotspot[textessai].html,[p]some txt for hotspot1[/p]);
				set(hotspot[textessai].ath,10); 
				set(hotspot[textessai].atv,-10); 
				set(hotspot[textessai].visible,true); "
		onout="set(hotspot[textessai].visible,false); "
		onclick=""; 
		/>

<hotspot name="hotspot2" ..........
		onover="set(hotspot[textessai].html,[p]some txt for hotspot2[/p]);
				set(hotspot[textessai].ath,100); 
				set(hotspot[textessai].atv,-40); 
				set(hotspot[textessai].visible,true); "
		onout="set(hotspot[textessai].visible,false); "
		onclick=""; 
		/>


This way you have only 1 "hotspot textfield".
for each hotspot, onover makes the action to give the right html text , the position with ath and atv, and makes visible the "hotspot textfield".....
and onout makes the "hotspot textfield" invisible....

I think it is correct...

About ath and atv:
  • ath
    point at horizontal position in spherical coordinates (0 .. 360°)
  • atv
    point at vertical position in spherical coordinates (-90 .. +90°)
I hope this can make the job... tell me.. ;-)

Salut.
Hi Michel:
do you have any method add a text to hotspot without using textfield plguin?
i want a use this run in mobile, and it do not support flashplayer,

could help me? thank you

7

Friday, April 8th 2016, 7:09am

i want a use this run in mobile, and it do not support flashplayer,
Using the 'textfield.swf' works in HTML5 too - there it gets automatically replaced by the internal HTML5 textfield plugin.

stevenChen

Beginner

Posts: 18

Location: beijing, china

  • Send private message

8

Wednesday, April 13th 2016, 7:41am

hotspot css does not support class and id selector

hi klaus:
the hotspot attribute css does not support class and id selector, just support element selector.

my xml file as below:
<hotspot name="textfieldhotspot"
url="textfield.swf"
width="150"
height="150"
ath="0.7747"
atv="-11.2726"
distorted="true" rx="0.0" ry="0.5" rz="0.2"
html="[p id='texthotspotCls']Hello World[/p]"
css="p.texthotspotCls {
color:#00ff00;
font-family:Arial;
font-weight:bold;
font-size:14;
margin-left:5;
margin-right:5;
text-align:center;
}"
backgroundcolor="0xFFFFFF"
backgroundalpha="1.0"
roundedge="5"
shadow="1"
borderwidth="0"
glow="4"
glowcolor="0xFFFFFF"
autosize="center"
ondown="draghotspot();"/>

the id selector did not work

<hotspot name="textfieldhotspot"
url="textfield.swf"
width="150"
height="150"
ath="0.7747"
atv="-11.2726"
distorted="true" rx="0.0" ry="0.5" rz="0.2"
html="[p id='texthotspotCls']Hello World[/p]"
css="p{
color:#00ff00;
font-family:Arial;
font-weight:bold;
font-size:14;
margin-left:5;
margin-right:5;
text-align:center;
}"
backgroundcolor="0xFFFFFF"
backgroundalpha="1.0"
roundedge="5"
shadow="1"
borderwidth="0"
glow="4"
glowcolor="0xFFFFFF"
autosize="center"
ondown="draghotspot();"/>

the element work ok
could you give me some advice? thank you

9

Wednesday, April 13th 2016, 11:58am

the hotspot attribute css does not support class and id selector, just support element selector.
Yes, there is only simple support - full manual html and css parsing would be too extensive in code size and too time-consuming in processing time.

stevenChen

Beginner

Posts: 18

Location: beijing, china

  • Send private message

10

Thursday, April 14th 2016, 2:52am

Dear klaus:
because the hotspot attribute does not support manual css, so i do not kown how to add a custom ui that contains the images and text as hotspot?
like this:


the link http://720yun.com/t/a362dwavcna?pano_id=72894

do you have other idea? thank you

stevenChen

Beginner

Posts: 18

Location: beijing, china

  • Send private message

11

Thursday, April 14th 2016, 11:12am

I have find the idea to achieve what i need
just use the layer to layout ui, and set the "parent" attribute of layer be the hotspot[name];

so we can achieve the custom ui as a hotspot

12

Sunday, May 15th 2016, 10:16am

I have find the idea to achieve what i need
just use the layer to layout ui, and set the "parent" attribute of layer be the hotspot[name];
so we can achieve the custom ui as a hotspot
It's good idea. *thumbsup*

Similar threads