Hi guys!
Nonsense, but I do not understand what went wrong — need a your help!
I'm using examle with flyin effect for pictures(gallery room):
https://krpano.com/examples/10815…rhaus/tour.html
I want to click on the image when the background was darkened! I have tried many of options, but blackout was always on top, above a picture!
ZORDER attribute does not affect this! I can not understand where the error?
Code
<hotspot name="spot_zoombild" style="zoomspot" alpha="0.5" ath="236.65" atv="2.72" scale="0.30" zorder="4" onclick="tint-on();flyin(zoombild); set(autorotate.enabled,false);" />
<hotspot name="zoombild" url="%FIRSTXML%/media/pic_fontan.jpg"
ath="235.5846" atv="-2.4199"
distorted="true"
zorder="50"
scale="0.1376"
rx="-1.75" ry="-44.75" rz="0.7571"
enabled="false"
visible="false"
alpha="0.0"
flying="0.0"
onclick="tint-off(); flyout(zoombild); set(autorotate.enabled,true);"
/>
<layer name="tint-bg" keep="true" type="container" zorder="1" align="center" width="100%" height="100%" y="0" bgcolor="0x000000" visible="false" enabled="false" bgalpha="0.0" />
<action name="tint-on">
set(layer[tint-bg].enabled,true);
set(layer[tint-bg].visible,true);
tween(layer[tint-bg].bgalpha, 0.5, 1.0, easeOutQuad; );
</action>
<action name="tint-off">
set(layer[tint-bg].enabled,false);
tween(layer[tint-bg].bgalpha, 0.0, 1.0, easeOutQuad, set(layer[tint-bg].visible,false); );
</action>
<!-- fly in a hotspot = show hotspot fixed at screen -->
<action name="flyin">
looktohotspot(get(name), 40, smooth(100,50,500), WAIT);
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);
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));
WAIT(0.5);
zoomto(75, smooth(100,50,500););
</action>
<!-- calc the max. flyout size of a hotspot for the current screen size -->
<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,
div(hotspot[%1].width,stagewidth,stageheight);
mul(hotspot[%1].width,80);
txtadd(hotspot[%1].width,'%');
set(hotspot[%1].height,prop);
,
set(hotspot[%1].width,prop);
set(hotspot[%1].height,80%);
);
</action>
Display More