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

41

Dienstag, 29. Juni 2010, 03:32

$@!$%@&

...where to put.. tall_add("Krpano");

..??

I love those steep learning curves but i don't get this.. i have to set that name thing somewhere but...
one working example?? Please??
somebody?

i go
*sleeping* *sleeping*

Tuur

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (29. Juni 2010, 03:43)


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

42

Dienstag, 29. Juni 2010, 04:13

i try with your great tut aside but i don't get it...

want to sleep with a smile..

..

43

Dienstag, 29. Juni 2010, 04:15

Hi Tuur,

The code from steve is the way I think.. only a little mistake inside ...
txtadd(data[css].content,....
should be:
txtadd(data[css2].content,....

Quellcode

1
2
3
4
5
6
7
8
<action name="taal_add">
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[css2].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight)," font-family:",get(taal_family),";}");
txtadd(data[html_add].content,"<p>I love %1 in hotspot ",get(name),"</p>");
set(hotspot[ab_1].css,data:css2);
</action>


About your request on using textstyle... I think it is not possible... textstyle apply for showtext() action... See here: http://krpano.com/docu/xml/#textstyle ...

SAlut... *sleeping* *sleeping* *sleeping*

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

44

Dienstag, 29. Juni 2010, 04:19

still no text..

i'm shure i have to do something with that argument... get name.. ??

where to put this:
tall_add("how steve enhance our knowledge :)");
*confused*

45

Dienstag, 29. Juni 2010, 04:34

inside the onstart but after action(load1)...
tour.xml

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<krpano version="1.0.8"   onstart="action(load1);tall_add("how steve enhance our knowledge :)");">
    
<include url="structure.xml" />
<include url="actions_s.xml" />
<include url="actions_move.xml" />
<include url="actions_load.xml" />

<include url="text.xml" />
<include url="menu1.xml" />

<include url="taal.xml" />

<include url="plugins.xml" />
    
</krpano>


And inside taal.xml the modified action from Steve:

Quellcode

1
2
3
4
5
6
7
8
9
10
....
<action name="taal_add">
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight)," font-family:",get(taal_family),";}");
txtadd(data[html_add].content,"<p>I love %1 in hotspot ",get(name),"</p>");
set(hotspot[ab_1].css,data:css2);
</action>
....


I think it should work...

SAlut... *sleeping* *sleeping* *sleeping* *sleeping*

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

46

Dienstag, 29. Juni 2010, 04:46

onstart="action(load1);tall_add("how steve enhance our knowledge :)");"

gives error..

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

47

Dienstag, 29. Juni 2010, 04:53

i try this ... :-(


<action name="taal_add">

set($pano3_add1, <p> Can not get that textstyle thing in...</p>);
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[css2].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight)," font-family:",get(taal_family),";}");
set(data[html_add].content,get($pano3_add1));

set(hotspot[ab_1].css,data:css2);
</action>

48

Dienstag, 29. Juni 2010, 05:15

Tuur,

So sorry for adding to your frustration and confusion. More than one typo on that example, my fault for trying to do it on my iphone.

First thing, call taal_add(Krpano) from the onloaded attribute of the hotspot. Also, there's a typo (missing semicolon before font-family) in the action I posted above, here's the corrected code:

Quellcode

1
2
3
4
5
6
7
8
<action name="taal_add">
		set(taal_color,"#0000ff");
		set(taal_weight,"bold");
		set(taal_family,"Verdana,Arial,Helvetica");
		txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight),"; font-family:",get(taal_family),";}");
		txtadd(data[html_add].content,"<p>I love %1 in hotspot ",get(name),"</p>");
		set(hotspot[ab_1].css,data:css);		
</action>
and you set the onloaded attribute as follows:

Quellcode

1
onloaded="taal_add(Krpano);"
in the hotspot.

Also, sorry about the typo tall_add...that's what happens on a US iPhone when you have auto-spelling correction turned on and you type taal_add!

Okay, here's what's going on. The txtadd function connects together multiple strings into a single string. So for example:

Quellcode

1
txtadd(foo,"hi ","there "," Arthur");
would set the variable foo to the value "hi there Arthur". The cool thing about txtadd is that you can merge the values of variables in with strings like we do in this example:

Quellcode

1
2
3
set(tmp,"red");
set(tmp2,"blue");
txtadd(prose,"roses are ",get(tmp),", violets are ",get(tmp2));
This code sets the variable named prose to the value "roses are red, violets are blue" You can see that we've taken the values of tmp ("red") and tmp2 ("blue") and inserted them into the string.

Also, recall that you can pass arguments into an action. For example, if we call test(hello,arthur); then inside for the test action anywhere you see %1 you substitute hello (the first argument) and anywhere you see %2 you substitute arthur.

So in our example above, when the onloaded="taal_add(Krpano);" event fires, line 6 of the taal_add action:

Quellcode

1
txtadd(data[html_add].content,"<p>I love %1 in hotspot ",get(name),"</p>");
sets the contents of the data element named html_add to the string "<p> I love Krpano in hotspot ab_1</p>". Because taal_add(Krpano) is called from the "onloaded" attribute of the ab_1 hotspot, then all of the attributes of the hotspot attributes (name, url, keep, ath, atv, etc.) become available as variables. So the get(name)[b] turns into "ab_1" when called from an event attribute of the hotspot named "ab_1".

Hope this isn't too confusing.

steve

PS

Quellcode

1
onstart="action(load1);tall_add("how steve enhance our knowledge :)");"
doesn't work because 1) [b]tall_add
is a typo, it should be taal_add and 2) you can't nest double quotes. Here's the correct syntax:

Quellcode

1
onstart="action(load1);taal_add('how Michel enhances our knowledge :)');"
But note that calling taal_add from onstart won't have the name variable properly set to "ab_1" because it isn't called from one of the event attributes of the "ab_1" hotspot.

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

49

Dienstag, 29. Juni 2010, 05:27

O steve, you are the master of tut's...but

i understand quite oke but the text doesn't show..

i found the typo's aswell but can't get the text to show..
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
55
56
57
58
<action name="taal_add">
set(taal_color,"#0000ff");
		set(taal_weight,"bold");
		set(taal_family,"Verdana,Arial,Helvetica");
		txtadd(data[css].content,"body { color:",get(taal_color),"; font-weight:",get(taal_weight),"; font-family:",get(taal_family),";}");
		txtadd(data[html_add].content,"<p>I love %1 in hotspot ",get(name),"</p>");
		set(hotspot[ab_1].css,data:css);
</action>



<data name="html_add"> 
				
	</data>


	<hotspot name="ab_1"
	        url="../P/plugins/textfield.swf"
	         keep="false"
	         ath="190.42787182410882" atv=" -13.8535854767984252"
	         width="160" height="prop"
	         scale="1" scale9grid="" scalechildren="true" rotate="0"
	         crop="" ondowncrop="" onovercrop=""
	         visible="true" enabled="true" handcursor="true" capture="false" children="false"
 	         zorder="90"
	         alpha="1.00" blendmode="normal" smoothing="true"
 	         refreshrate="auto"
 	         onloaded="taal_add(Krpano);"

	         onover=""
	         onhover=""
	         onout=""
	         ondown=""
	         onup=""
	         onclick=""
	         autosize="none"
	         background="true"
	         backgroundalpha="1"
	         backgroundcolor="0xFF0000"
	         blur="0"
	         css=""
	         details="8"
	         effect=""
	         glow="0"
	         glowcolor="16777215"
	         html=""
	         inverserotation="false"
	         roundedge=""
	         selectable="true"
	         shadow="0"
	         textblur="0"
	         textglow="0"
	         textglowcolor="16777215"
	         textheight="60"
	         textshadow="0"
	         usecontentsize="false"
	         wordwrap="true"
	         />			



and

<krpano version="1.0.8" onstart="action(load1);taal_add('how Michel enhances our knowledge :)');"
>

50

Dienstag, 29. Juni 2010, 05:39

O steve, you are the master of tut's
Hey that's what my wife calls me after a big Mexican dinner....

In the hotspot, set this attribute:

Quellcode

1
	         html="data:html_add"


And so long as you have the onloaded="taal_add(Krpano);" set in the hotspot, you can eliminate the call to taal_add in the onstart
That should fix it!

steve

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

51

Dienstag, 29. Juni 2010, 05:43

voila!!

Tutti gracie!!


Time to sleep 05:41 am here... ;-)

good morning..

Thanx
a lot Steve... that you took so much time for this (me/us)

Gonna play with it after sleep

CHEERS *thumbsup*

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

52

Dienstag, 29. Juni 2010, 08:15

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Tuur« (29. Juni 2010, 11:12)


53

Dienstag, 29. Juni 2010, 16:02


....But there is much to learn !!!


And that is the great thing *smile* ...
But your pano makes me remember that I need holydays urgently (isn't it Steve?) *g* ... So I am going to seat on the sand and look to how the time slowly goes ;-) ...

SAlut *thumbsup* .

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

54

Dienstag, 29. Juni 2010, 16:42

moi aussi! en 10 jours, pour sept semaines.. *thumbup*

Tuur *thumbsup*

55

Dienstag, 29. Juni 2010, 16:43

Nice job Tuur, looks like you've got it!

Superb work on the shadow removal on the pano nadir by the way...

... So I am going to seat on the sand and look to how the time slowly goes ;-) ...


Last month I helped my daughter take her first panorama at the beach for a school project. Very rewarding!

steve

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

56

Montag, 5. Juli 2010, 14:42

oke that all is nice working accept:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<action name="onclick">
		set($pano3_add1_click, openurl(http://www.virtualtuur.com));
		set($pano3_add2_click, openurl(http://www.google.com,_blank));
		set($pano3_add3_click, openurl(http://www.google.com,_blank));
		set($pano3_add4_click, openurl(http://www.google.com,_blank));
		set($pano3_add5_click, openurl(http://www.google.com,_blank));
		
		set(hotspot[ab_1].onclick,get($pano3_add1_click));
		set(hotspot[ab_2].onclick,get($pano3_add2_click));
		set(hotspot[ab_3].onclick,get($pano3_add3_click));
		set(hotspot[ab_4].onclick,get($pano3_add4_click));
		set(hotspot[ab_5].onclick,get($pano3_add5_click));


	</action>



why doesn't this work? and how to get it to work??


btyw: is there also away to use a comma in the textfield?

Thanx

Tuur *thumbsup*

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

57

Montag, 5. Juli 2010, 15:34

ah i found the comma: and,cross184; (like &#...;)

but i don't understand why that onclick is not working.. *confused*

Thanx

tuur *thumbsup*

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

58

Montag, 5. Juli 2010, 15:53

Ahh... sometimes it's good to take a 5 minute break ;-)

Got it..

Cheers
Tuur *thumbsup*

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

59

Montag, 5. Juli 2010, 18:28

oke ,

new problem...


http://www.virtualtuur.com/w_c/

just go through to the thirth pano... there u see text in the fields.. but it takes some time to appear..

but when you click on the 3th pano before it's fully loaded (as an interupt) it shows the fields but not the content..

i tried with oninterupt etc ... no succes..

any body?

(just made this as an example to show what goes wrong)


any idea??please??

Thanx

Tuur *thumbsup*