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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

1

Wednesday, March 30th 2011, 11:12pm

using variables in textfield for iphone/ipad

..
and when possible with set and get

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

2

Monday, April 4th 2011, 8:53pm

Hi,

changing the content of the textfield by setting a the "html" attribute should be already possible,

best regards,
Klaus

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

3

Monday, April 4th 2011, 9:03pm

but no chance with set get? just for the text.. so i can use the same set as i do for the desktop xml?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

4

Monday, April 4th 2011, 9:11pm

Hi,

sorry, I'm not sure what you mean now,
setting and getting the html attribute is possible of course,

but using "get()" inside the html text is not possible, not in Flash and also not in JS,

best regards,
Klaus

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

5

Monday, April 4th 2011, 9:23pm

when i do for i phone:

html="get($krp_1);" or so it doesn't work but i do the same thing for desktop

like

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
<krpano version="1.0.8" logkey="false" onstart="credit_var();text_credit();style_var();title_text();text_var();text_text();" >


<style name="credittextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			alpha="1"
			html="data:html_credit_text"
			css=""
			align="lefttop" x="60" y="1"
	                background="false"		
			backgroundcolor=""
			width="100%"
			height="22"
			zorder="100"
	                onloaded="text_var_credit();credit_var();style_var();
                       delayedcall(10, tween(alpha,0,0.5,,WAIT);title(););"
 
/>



<action name="text_credit">
	set($ph_1, Photography by Arthur van den Enk);

</action>


		<data name="html_credit_text"></data>
				
		<plugin name="credit_text" style="credittextstyle"/>

<action name="credit_var">
	
		txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight),"; font-family:",get(taal_family),";}");
		set(plugin[credit_text].css,data:css);
	</action>

<action name="text_var_credit">
		txtadd(data[html_credit_text].content,"<p>",get($ph_1),"</p>");
	</action>


that works perfect spread over different xml's... but i like to do the 'same' on idevices.. *confused*

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

6

Monday, April 4th 2011, 9:26pm

Hi,

okay, I have never tested that yet,
but using a '$' in a variable name can be problematic,

please try it without '$',

best regards,
Klaus

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

7

Monday, April 4th 2011, 9:27pm

oke i will later tonight.. and post results.

Thanx
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

8

Thursday, April 14th 2011, 7:56pm

mmm

i do
:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<style name="credittextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			
			alpha="1"
			html="[div style='color:#333366;width:100%;height:100%;
	font:bold 12px Verdana;text-align:left;']data:html_credit_text[/div]"
			css=""
			align="lefttop" x="60" y="-1"
	        background="false"		
			backgroundcolor=""
			width="100%"
			height="38"
					zorder="100"
	        onloaded="text_var_credit();credit_var();style_var();

delayedcall(10, tween(alpha,0,0.5,,WAIT);set(html, [div style='color:#333366;width:100%;height:100%;
	font:bold 12px Verdana;text-align:left;']data:html_title_text[/div]); tween(alpha,1,0.5););"
 
/>


but it shows the text : data:html_credit_text
and later: data:html_title_text

how can i get that it prints the text that is in the variable ..

the whole code:

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
onstart="title_var();credit_var();text_title();text_credit();style_var();startup();"

....



<scene name="scene_anp_tuschinski_1" title="anp_tuschinski_1" onstart="" thumburl="anp_tuschinski_1.tiles/thumb.jpg">

<view hlookat="0" vlookat="0" limitview="on" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" vlookatmin="-90" 
		vlookatmax="+90"/>

<preview url="anp_tuschinski_1.tiles/preview.jpg" />

		<image>
			<mobile>
				<left  url="../tuschinski_1/1.tiles/mobile_l.jpg" />
				<front url="../tuschinski_1/1.tiles/mobile_f.jpg" />
				<right url="../tuschinski_1/1.tiles/mobile_r.jpg" />
				<back  url="../tuschinski_1/1.tiles/mobile_b.jpg" />
				<up    url="../tuschinski_1/1.tiles/mobile_u.jpg" />
				<down  url="../tuschinski_1/1.tiles/mobile_d.jpg" />
			</mobile>
		</image>


		<data name="html_credit_text"> </data>
				
		<plugin name="credit_text" style="credittextstyle"/>
				
		<action name="text_var_credit">
				txtadd(data[html_credit_text].content,"<p>",get(ph_1),"</p>");
			</action>		
				
		<data name="html_title_text"> </data>
				
		<plugin name="title_text" style="titletextstyle"/>	
				
		<action name="text_var_title">
				txtadd(data[html_title_text].content,"<p>",get(tit_1),"</p>");
			</action>		
</scene>


<action name="style_var">
		set(taal_color,"#333366");
		set(taal_weight,"");
		set(taal_family,"Verdana,Arial,Helvetica");


	</action>	

	<action name="text_credit">
	
	
		set(ph_1, Photography by Arthur van den Enk);
	
		
    </action>


<action name="text_title">
	
	
		set(tit_1, De foyer van theater Tuschinski.);
	
    </action>


<action name="credit_var">
	
		txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight),"; font-family:",get(taal_family),";}");
		set(plugin[credit_text].css,data:css);
	</action>


<action name="title_var">
	
		txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight),"; font-family:",get(taal_family),";}");
		set(plugin[title_text].css,data:css);
	</action>


<style name="credittextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			
			alpha="1"
			html="[div style='color:#333366;width:100%;height:100%;
	font:bold 12px Verdana;text-align:left;']data:html_credit_text[/div]"
			css=""
			align="lefttop" x="60" y="-1"
	        background="false"		
			backgroundcolor=""
			width="100%"
			height="38"
					zorder="100"
	        onloaded="text_var_credit();credit_var();style_var();

delayedcall(10, tween(alpha,0,0.5,,WAIT);set(html, [div style='color:#333366;width:100%;height:100%;
	font:bold 12px Verdana;text-align:left;']data:html_title_text[/div]); tween(alpha,1,0.5););"
 
/>





<style name="titletextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			alpha="0"
			html=""
			css=""
			align="lefttop" x="60" y="-1"
	        background="false"
			
			backgroundcolor=""
			width="100%"
			height="38"
					zorder="100"
	        onloaded="text_var_title();title_var();style_var();"
					
/>


probably i don't need the style var on the mobile because it's in the div style...

but how to get the variable in place??
*confused*


Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

9

Thursday, April 14th 2011, 8:20pm

cleaned up the code to make it more clear..

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
<scene name="scene_anp_tuschinski_1" title="tuschinski_1" onstart="" thumburl="tuschinski_1.tiles/thumb.jpg">
	<view hlookat="0" vlookat="0" limitview="on" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" vlookatmin="-90" vlookatmax="+90"/>

		<preview url="anp_tuschinski_1.tiles/preview.jpg" />

		<image>
			<mobile>
				<left  url="../tuschinski_1/1.tiles/mobile_l.jpg" />
				<front url="../tuschinski_1/1.tiles/mobile_f.jpg" />
				<right url="../tuschinski_1/1.tiles/mobile_r.jpg" />
				<back  url="../tuschinski_1/1.tiles/mobile_b.jpg" />
				<up    url="../tuschinski_1/1.tiles/mobile_u.jpg" />
				<down  url="../tuschinski_1/1.tiles/mobile_d.jpg" />
			</mobile>
		</image>


		<data name="html_credit_text"> </data>
				
		<plugin name="credit_text" style="credittextstyle"/>
				
		<action name="text_var_credit">
				txtadd(data[html_credit_text].content,"<p>",get(ph_1),"</p>");
			</action>		
				
		<data name="html_title_text"> </data>
				
		<plugin name="title_text" style="titletextstyle"/>	
				
		<action name="text_var_title">
				txtadd(data[html_title_text].content,"<p>",get(tit_1),"</p>");
			</action>	

</scene>



<action name="text_credit">
	
		set(ph_1, Photography by Arthur van den Enk);
		
    </action>





<action name="text_title">

		set(tit_1, De foyer van theater Tuschinski.);
	
    </action>




<style name="credittextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			
			alpha="1"
			html="[div style='color:#333366;width:100%;height:100%;
	font:bold 12px Verdana;text-align:left;']data:html_credit_text[/div]"
			css=""
			align="lefttop" x="60" y="-1"
	        background="false"		
			backgroundcolor=""
			width="100%"
			height="38"
					zorder="100"
	        onloaded="text_var_credit();delayedcall(10, tween(alpha,0,0.5,,WAIT);set(html, [div style='color:#333366;width:100%;height:100%;font:bold 12px Verdana;text-align:left;']data:html_title_text[/div]); tween(alpha,1,0.5););"
 
/>





<style name="titletextstyle" 
			url="../plugins/textfield.swf"		
			keep="false"
			visible="true"
			selectable="false"
			alpha="0"
			html=""
			css=""
			align="lefttop" x="60" y="-1"
	        background="false"
			
			backgroundcolor=""
			width="100%"
			height="38"
					zorder="100"
	        onloaded="text_var_title();"
					
/>




So ..
How to make that it's n ot printing the text : data:html_credit_text

but that it gets that variable from : text_var_credit();


i have sort of the same 'system' working on desktop and that works perfect and is also very clear..

Tuur *confused*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Apr 14th 2011, 8:37pm)


Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

10

Friday, April 15th 2011, 12:25am

Right, you must use textadd here to add your strings together.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

11

Friday, April 15th 2011, 12:30am

so?

can i make it work?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

12

Friday, April 15th 2011, 2:25am

That's all kind of a complete confusing mess with everything linking for no good reason, and bad use of txtadd setting the html.
Try looking through the examples of the textfield and txt add.. and going slow and using trace, to check for success on utilizing variables.

You could be making a single function to set a string to any textfield plugin. Also research arguments.

Also try this.

<action name="text_var_credit">


txtadd(plugin[credit_text].html,'[p]',get(ph_1),'[/p]');
</action


this is skipping the use of your data field completely.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

13

Friday, April 15th 2011, 2:40am

yes i know..

i copied from an other tour because it works as i like but with arguments etc it would be much better only...
i still don't get it really...

There is still some stuff there that i don't need in the scene... so fist i'll clean up more..

i also don't see how to make it that every scene get's his own two texts then..
Well.. i give a try to learn...

I probably need some help here..

maybe a nice start up?

Thanx

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Apr 15th 2011, 3:01am)


Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

14

Friday, April 15th 2011, 3:05am

Thats EASY!

Put <data name="htmldata1"><p>text</p></data>

INSIDE THE SCENE TAG

AND
<scene onstart="set(plugin[text_title].html,data:htmldata1)"


And then you don't need any of that weird mess of stuff.
yes i know..

i also don't see how to make it that every scene get's his own two texts then..
Well.. i give a try to learn...

I probably need some help here..

maybe a nice start up?

Thanx

Tuur *thumbsup*
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

15

Friday, April 15th 2011, 3:19am

That is / does not what i mean..

i prepare an example
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

16

Friday, April 15th 2011, 3:42am

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

look in iphone mode (safari or so)

the first scene i did what u say the second shows what i like to do.. after 5 secs the text also changes..
i lik to get the text from a list of variables as in the taal.xml..

in the big tour i go over 50 pano's..

It's nice when you can use the same taal.xml with all text variables for all devices and desktop..

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Apr 15th 2011, 4:01am)


Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

17

Friday, April 15th 2011, 4:11am

You sure you're not using a very old textfield.swf?
or iphonejs?

maybe remove the style for the url for textfield..

I think it's pointing wrong anyway.
My textfield change on scene works fine with the code I posted to you.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

18

Friday, April 15th 2011, 11:45am

well i was sure..

- took gyro out
- checked textfield plug

now i am sure

DON'T FORGET TO LOOK IN IPHONE MODE

actualy it works only it put's not the text var ... how to do that??

Still the same.

Tuur *confused*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

19

Friday, April 15th 2011, 3:50pm

Looks the same to me, you still have a bunch of actions not working properly and the plugin trying to use it's data.

There is no difference on flash in how it's supposed to work.
Start with flash and start with a clean xml without a million things like broken styles and broken functions.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,154

Location: Netherlands

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

  • Send private message

20

Friday, April 15th 2011, 3:56pm

show me one thing that does not work or is wrong..
the only thing that does not work is that i can't get the set var in the txtadd..

i think you don't understand what i want at all..

broken textstyle? show me

edit: cleaned up a bit more.. same result
maybe, as u know so well, u can show me how i can get the text that is set as ph_1 in the textfiels.. same for the title.. tit_1
by using the taal.xml



in flash it works perfect i use for a year now.

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur