Sie sind nicht angemeldet.

viewinz

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

1

Donnerstag, 17. September 2009, 02:06

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

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

2

Donnerstag, 17. September 2009, 05:59

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?

3

Donnerstag, 17. September 2009, 06:00

Hi viewinz,

I think doing something like this:

Quellcode

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

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

4

Donnerstag, 17. September 2009, 06:25

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.

5

Donnerstag, 17. September 2009, 06:49

Hi viewinz,

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

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

6

Mittwoch, 6. April 2016, 08:00

Hi viewinz,

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

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

Freitag, 8. April 2016, 07:09

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.

8

Mittwoch, 13. April 2016, 07:41

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

Mittwoch, 13. April 2016, 11:58

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.

10

Donnerstag, 14. April 2016, 02:52

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

11

Donnerstag, 14. April 2016, 11:12

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

Sonntag, 15. Mai 2016, 10:16

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*

Ähnliche Themen