Sie sind nicht angemeldet.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

1

Freitag, 2. Dezember 2011, 19:31

compass numbers in text

Hi,

i try to get the compass 'numbers' in textfield..
I have:

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
....onstart="set(heading, 0);intro();load1();" ...


<events onviewchange="onviewchange();" />


<action name="onviewchange">
	sub(textview, view.hlookat, heading);
	txtadd(data[html_pic_id].content,"<p>",'FOV=',get(textview), '°',"</p>");
	trace('get(textview)');

</action>

<data name="html_pic_id"> 
	</data>

<plugin name="text_pic_id"
 	        url="../skin/plugins/textfield.swf"
	        keep="true"
 	        visible="true" enabled="true" handcursor="false" capture="true" children="true"
 	        zorder="100"
 	        alpha="1.00" blendmode="normal"
 	        smoothing="true"
 	        origin="bottom" edge=""
 	        x="0" y="5"
 	        width="250" height="30"
	        scale="1"
	        onloaded="text_var();style_var();"
	        onover=""
	        onhover=""
	        onout=""
	        ondown=""
	        onup=""
	        onclick=""
	        autosize="none"
	        background="false"
	        backgroundcolor=""
	        blur="0"
	        bordercolor=""
	        borderwidth="0"
	        css=""
	        glow="0"
	        glowcolor=""
	        html="data:html_pic_id"
	        roundedge="8"
	        selectable="false"
	        shadow=""
	        textblur="0"
	        textglow="0"
	        textglowcolor=""
	        textshadow=""
			parent="STAGE"
			
	        />



The trace in the onviewchange action gives the right result but why don't i see it changing in the textfield... it just says 0 ?

Thanx

Tuur *thumbsup*

panomaster

Fortgeschrittener

Beiträge: 297

Wohnort: Kobyłka, Poland

Beruf: Virtual Tours - Spherical Panoramas - Krpano developer

  • Nachricht senden

2

Freitag, 2. Dezember 2011, 19:40

I don't know why you use additional data object. Try to update html attribute of textfield directly:

Quellcode

1
txtadd(data[html_pic_id].html,"<p>",'FOV=',get(textview), '°',"</p>");

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Freitag, 2. Dezember 2011, 19:43

ah found it


<action name="onviewchange">
sub(textview, view.hlookat, heading);
txtadd(data[html_pic_id].content,"<p>",'FOV=',get(textview), '°',"</p>");
set(plugin[text_pic_id].css,data:css);
trace('get(textview)');

</action>

he pano master .. what do you mean?

Tuur *thumbsup*

panomaster

Fortgeschrittener

Beiträge: 297

Wohnort: Kobyłka, Poland

Beruf: Virtual Tours - Spherical Panoramas - Krpano developer

  • Nachricht senden

4

Freitag, 2. Dezember 2011, 20:26

Data object is good for storing large amounts of text or text with troublesome characters eg. both single and double quotation signs. There's no need to create one more object for such simple task. I would do the same without <data> object and update html attribute of textfield.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Freitag, 2. Dezember 2011, 20:45

mmm i'm stupid
i try and try...

in textfield plugin..

html="FOV=get(textview)"

something must be around the get(textview)....

tried a lot of different settings..

maybe i need a break

Tuur *thumbsup*

panomaster

Fortgeschrittener

Beiträge: 297

Wohnort: Kobyłka, Poland

Beruf: Virtual Tours - Spherical Panoramas - Krpano developer

  • Nachricht senden

6

Freitag, 2. Dezember 2011, 23:50

Tuur, just remove

Quellcode

1
2
<data name="html_pic_id"> 
	</data>


and change

Quellcode

1
txtadd(data[html_pic_id].content,"<p>",'FOV=',get(textview), '°',"</p>");


to

Quellcode

1
txtadd(plugin[html_pic_id].html,"<p>",'FOV=',get(textview), '°',"</p>");

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

8

Dienstag, 13. Dezember 2011, 01:51

Hi,

mmmm.. ;-\

i like to set the radar 'course' in text field in degrees..

i have:

Quellcode

1
2
3
4
5
6
7
8
9
10
<action name="onviewchange">

               adjusthlookat(view.hlookat);
               trace('get(view.hlookat)');

		txtadd(data[html_pic_id].content,"<p>",'Kompas&nbsp;=&nbsp; ','get(view.hlookat)', '°',"</p>");
		set(plugin[text_pic_id].css,data:css);
		
		
</action>


but also:

Quellcode

1
		txtadd(data[html_pic_id].content,"<p>",'Kompas&nbsp;=&nbsp; ',get('view.hlookat'), '°',"</p>");

seems to work.. almost.. *wacko*

http://www.virtualtuur.com/krpano/radar2/

In the logkey the number is right, but in the textfield it shows only the first '0'

i like the numbers change when you turn offcourse..

*question* *question*

Tuur *thumbsup*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Tuur« (13. Dezember 2011, 02:27)


Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

9

Mittwoch, 14. Dezember 2011, 15:30

yeahhh got it.

http://www.virtualtuur.com/krpano/radar2/

(textfield was to short *cry* *wacko* *blink* *unsure* *g* )
Thanx to A.hoeben!! field of view.com

tuur *thumbsup*