Sie sind nicht angemeldet.

JPG_master

Anfänger

  • »JPG_master« ist der Autor dieses Themas

Beiträge: 20

Wohnort: Deutschland

Beruf: IT Manager

  • Nachricht senden

1

Freitag, 20. Juni 2014, 20:44

Tooltip - child to HotSpot - staying active and following the view changes


<hotspot name="portraitfresko-west1"
style="hotspot_ani_red|flagtype-bannertext|fresco_hotspot"
alpha="1" ath="-10.62" atv="-10.95" onhover="" onout="" keep="true"
tooltip="Kirchenlehrer:[br]Albertus"
pic="albertusmagnus"
/>

<style name="flagtype-bannertext"
onclick="showflagtype-bannertext();"
/>

<style name="flagtype-bannertextstyle" keep="true"
url="%BASEDIR%/plugins/textfield.swf"
visible="true" alpha="1"
enabled="true"
align="lefttop"
edge="bottom"
padding="4 4 20 4"
autowidth="true"
autoheight="true"
background="false" backgroundcolor="0xFFFFFF" backgroundalpha="1.0"
border="false" bordercolor="0x000000" borderalpha="1.0"
borderwidth="1.0" roundedge="0"
shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0"
textshadow="1" textshadowrange="6.0" textshadowangle="90" textshadowcolor="0x000000" textshadowalpha="1.0"
css="text-align:center; color:#00FFFF; font-family:Arial; font-weight:bold; font-size:14px;"
/>

<action name="showflagtype-bannertext">
<!-- creates a new layer and shal show text -->
if(layer[get(pic)] === null
,
addlayer(get(pic));
set(layer[get(pic)].style, flagtype-bannertextstyle);
txtadd(plugin[MyTourControlVars].spotname1,'hotspot[',get(name),'].name');
set(layer[get(pic)].parent,get(plugin[MyTourControlVars].spotname1) );
set(layer[get(pic)].visible,true);
set(layer[get(pic)].distorted,true);
set(layer[get(pic)].zorder,2);
set(layer[get(pic)].scale,1.0);
set(layer[get(pic)].alpha,1.0);
txtadd(onloadstring,'copy(layer[',get(pic),'].html, tooltip); showlog(); ' );
set (layer[get(pic)].onloaded, get(onloadstring) );
copy(layer[get(pic)].html, get(tooltip) );
trace('layer is null: ', get(pic) );
trace('picfilename: ', get(picfilename) );
trace('parent spot: ', get(plugin[MyTourControlVars].spotname1) );
trace('onloadstring:', get(onloadstring) );
trace('tooltip: ', get(tooltip) );
trace('style : ', get(layer[get(pic)].style) );
,
txtadd(picfilename,'%CURRENTXML%/images/PopUps/PopUp_',get(pic),'.jpg');
copy(layer[get(pic)].url,picfilename );
copy(layer[get(pic)].html,get(tooltip) );
);
</action>

Hi all,

I dont get this resolved .. need help.

What Do i want to .. waht have i done:
I want to have hotspot with "tooltips" that stay visible and follow the hotspot when moving the pano - just like flags-type-banners.

What have i done:
I made a combination of Klaus' "flying in" hotspots from the wine cellar and Klaus' tooltips example.

Explanation:
the hotspot has the 'pic' value as in Klaus' origin.
i have a style
flagtype-bannertext like Klaus "pic-hotspot"
FOR NOW - while expermenting - i use the onclick on this hotspot.
Other than Klaus i now use addlayer (instead addhotspot), because i need to link the textstyle.swf to that layer.
In order to ease the ADDLAYER creation in the ACTION "
showflagtype-bannertext" i moved many layer-ekement to a style which i refer to while creating it.

Why ADDLAYER
I want to have 12 spots active in thepano (see ref below given), so i need dynamically created layers

What are the symptoms:
clicking on the hotspot all traces appear as i would expect WHEN THE LAYER IS ADDED:
INFO: layer is null: albertusmagnus
INFO: picfilename: null
INFO: parent spot: portraitfresko-west1
INFO: onloadstring:copy(layer[albertusmagnus].html, tooltip); showlog();
INFO: tooltip: Kirchenlehrer:[br]Albertus
INFO: style : flagtype-bannertextstyle


But no tooltip appears. *sad*
Clicking the second time WHEN THE LAYER ALREADY EXISTS, the picture PICFILENAME appears
(see the comma indication FALSE branch for
f(layer[get(pic)] === null,)

Ths means to me:
Layer creation fine
no hidden trapp currently (alpha values, visibles, scale etc)
BUT OBVIOUSLY the layerstyle with the textfield.swf is not beeing activated

Any ideas guys??? *whistling*

=====================

The pano where I want to use it is the following:
www.pandorama-place.com/panoramen/drafts…st/BibTest.html
using the leftmost button, one turns on all hostspots for the fantastic frescos and THEN THEN THE TITLE OF THE FRESCO shall be seen while moving to invite people to look at.
(btw it just for now is webspace. page ic under construction)

AND ... KLAUS ... a wonderful wonderful tool and exciting examples provided by you
THANK YOU


Honi soit qui mal y pense ! *thumbup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »JPG_master« (20. Juni 2014, 21:35)


JPG_master

Anfänger

  • »JPG_master« ist der Autor dieses Themas

Beiträge: 20

Wohnort: Deutschland

Beruf: IT Manager

  • Nachricht senden

2

Samstag, 21. Juni 2014, 01:27

Hi,

follwing the current day resp. nigth time i tried that stuff step by step.

Solution - or better workaround is - the style does not affect the ADDLAYER action.
BAD IS:
addlayer(get(pic));
set(layer[get(pic)].style, flagtype-bannertextstyle);

So in order to get it done one needs to as folows.
GOOD is:
addlayer(get(pic));
set(layer[get(pic)].url,%BASEDIR%/plugins/textfield.swf);
set .... copy .... etc

AND set the parameters for the textfield step by step, like
set(layer[get(pic)].css, text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:14px; );

Not so sexy like the use of the STYLE after the ADDLAYER action, but now it works.


Thanks for my answer ;-)

At Klaus:
Bug or is this line not correct:
set(layer[get(pic)].style, flagtype-bannertextstyle);
where
>> flagtype-bannertextstyle << is the name of the style .. see previous post

cheers
Honi soit qui mal y pense ! *thumbup*

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

3

Samstag, 21. Juni 2014, 11:53

Hi! You can't dynamically 'set' style, it's said in the documentaion:

http://krpano.com/docu/xml/#layer.style

Instead, use

Quellcode

1
layer[name].loadstyle(name of the style);


Documentation here: http://krpano.com/docu/xml/#layer.style
Regards,

Alexey

JPG_master

Anfänger

  • »JPG_master« ist der Autor dieses Themas

Beiträge: 20

Wohnort: Deutschland

Beruf: IT Manager

  • Nachricht senden

4

Samstag, 21. Juni 2014, 12:29

Alexey,

thanks. *thumbup*
Yes ... krpano is powerful .. so it has many many features ... and lines of code in documentation. *smile*

Thanks for the advice. As you can see at my own answer to myself, i found this out - unfortunatley after a significant time (not heaving read the docu).
Anhyow, this now is ingrained and i made another step forward.

thanks again and with my next issue i straight forward pick your support ... and if it is only to find the appropriate hint to the doc. *cool*

thx again and all the best for you and your country.
Honi soit qui mal y pense ! *thumbup*

Ähnliche Themen