$@!$%@&
...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
Tuur
$@!$%@&
...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
Tuur
i try with your great tut aside but i don't get it...
want to sleep with a smile..
..
Hi Tuur,
The code from steve is the way I think.. only a little mistake inside ...
txtadd(data
.content,....
should be:
txtadd(data[css[color=#ff0000][b]2[/b][/color]].content,....
[code]<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>
Display More
About your request on using textstyle... I think it is not possible... textstyle apply for showtext() action... See here: https://krpano.com/docu/xml/#textstyle ...
SAlut...
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 :)");
inside the onstart but after action(load1)...
tour.xml
<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>
Display More
And inside taal.xml the modified action from Steve:
....
<action name="taal_add">
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[code=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...
onstart="action(load1);tall_add("how steve enhance our knowledge :)");"
gives error..
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>
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:
<action name="taal_add">
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[code=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:
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:
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:
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:
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
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:
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.
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 :
<action name="taal_add">
set(taal_color,"#0000ff");
set(taal_weight,"bold");
set(taal_family,"Verdana,Arial,Helvetica");
txtadd(data[code=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"
/>
Display More
and
<krpano version="1.0.8" onstart="action(load1);taal_add('how Michel enhances our knowledge :)');"
>
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:
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
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
....But there is much to learn !!!
And that is the great thing ...
But your pano makes me remember that I need holydays urgently (isn't it Steve?) ... So I am going to seat on the sand and look to how the time slowly goes ...
SAlut .
moi aussi! en 10 jours, pour sept semaines..
Tuur
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
oke that all is nice working accept:
<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>
Display More
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
ah i found the comma: and,cross184; (like &#...;)
but i don't understand why that onclick is not working..
Thanx
tuur
Ahh... sometimes it's good to take a 5 minute break
Got it..
Cheers
Tuur
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
Don’t have an account yet? Register yourself now and be a part of our community!