Sie sind nicht angemeldet.

1

Montag, 23. April 2012, 17:50

showing text on onhover using "flyin and flyout"

Hello!

I have succeded in showing the text "click to show" on one picture using the code
onhover="showtext(click to show, videohoverstyle));"
on an hotspot.

Now I wonder what code to wright and where to put it to get the text "click to close" on the "on the fly" picture created with the code below. I have tried to put the same code
onhover="showtext(click to show, videohoverstyle));" but with bad result. I think this is pretty easy but as I am not a programmer I kindly ask someone to help me.

Can be shown here. http://www.pernylen.se/pano/wiik/

Regards Per Nylén





<action name="calc_flyout_size">

div(screen_sideaspect, stagewidth, stageheight);
div(hotspot_sideaspect, hotspot[%1].width, hotspot[%1].height);

if(screen_sideaspect LT hotspot_sideaspect,

<!-- align at screen width -->
div(hotspot[%1].width,stagewidth,stageheight);
mul(hotspot[%1].width,60);
txtadd(hotspot[%1].width,'%');
set(hotspot[%1].height,prop);
,
<!-- align at screen height -->
set(hotspot[%1].width,prop);
set(hotspot[%1].height,60%);
);
</action>

<!-- fly in a hotspot = show hotspot fixed at screen -->
<action name="flyin">

if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );

if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
set(hotspot[%1].enabled,true);
set(hotspot[%1].visible,true);
tween(hotspot[%1].alpha, 1.0);
tween(hotspot[%1].flying, 1.0);
tween(hotspot[%1].scale, 1.0);
tween(hotspot[%1].rx, 0.0);
tween(hotspot[%1].ry, 0.0);
tween(hotspot[%1].rz, 0.0);

</action>

<!-- fly the hotspot out/back -->
<action name="flyout">

set(hotspot[%1].enabled,false);
set(plugin[inforuta1].visible,false);
tween(hotspot[%1].alpha, 0.0, 0.5, default, set(hotspot[%1].visible,false); );
tween(hotspot[%1].flying, 0.0);
tween(hotspot[%1].scale, get(hotspot[%1].oldscale));
tween(hotspot[%1].rx, get(hotspot[%1].oldrx));
tween(hotspot[%1].ry, get(hotspot[%1].oldry));
tween(hotspot[%1].rz, get(hotspot[%1].oldrz));


</action>

<action name="showpic">
<!-- creates a new hotspot and fly it out -->

if(hotspot[get(pic)] === null,
txtadd(picfilename,'%CURRENTXML%/graphics/pic_',get(pic),'.jpg');
addhotspot(get(pic));
getcenter(hsath,hsatv);
copy(hotspot[get(pic)].ath, hsath);
copy(hotspot[get(pic)].atv, hsatv);
set(hotspot[get(pic)].visible,false);
set(hotspot[get(pic)].distorted,true);
set(hotspot[get(pic)].zorder,2);
set(hotspot[get(pic)].scale,0.1);
set(hotspot[get(pic)].alpha,0.0);
<!--set(hotspot[get(pic)].effect,glow(0xFFFFFF,1.0,30,10000);dropshadow(10,45,0x000000,10,0.3););-->
set(hotspot[get(pic)].onloaded, flyin(get(name)) );
set(hotspot[get(pic)].onclick, flyout(get(name)) );
copy(hotspot[get(pic)].url,picfilename);


,
flyin(get(pic));
);

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Montag, 23. April 2012, 18:18

try:


<action name="flyin">

if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );

if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
set(hotspot[%1].enabled,true);
set(hotspot[%1].visible,true);
set(hotspot[%1].onhover,showtext(click to hide, videohoverstyle));
tween(hotspot[%1].alpha, 1.0);
tween(hotspot[%1].flying, 1.0);
tween(hotspot[%1].scale, 1.0);
tween(hotspot[%1].rx, 0.0);
tween(hotspot[%1].ry, 0.0);
tween(hotspot[%1].rz, 0.0);

</action>


as most of the time i can not make text color and size in posts (Klaus!??)

it's about this line:
set(hotspot[%1].onhover,showtext(click to hide, videohoverstyle));

hope it helps,

Tuur *thumbsup*

3

Dienstag, 24. April 2012, 14:20

Thanks a lot Tuur!
*smile* *smile* *smile* *smile* *smile* *smile* *thumbsup*

It works!

Regards

Per Nylén