Good day!
Prompt how to make transition from a usual panorama to slider-pano (as in an example krpano) in one xml file? And back from slider to usual pano. I have a navigation panel a slider, and instead of cubes - the black screen.
Listing xml:
<scene name="scene_6_1" title="6_1" onstart="" thumburl="panos/6_1.tiles/thumb.jpg">
<view hlookat="30.24" vlookat="2.45" fovtype="MFOV" fov="90" maxpixelzoom="0.85" fovmin="60" fovmax="100" limitview="auto" />
<preview url="panos/6_1.tiles/preview.jpg" />
<image>
<cube url="panos/6_1.tiles/pano_%s.jpg" />
</image>
<hotspot name="hs1" devices="all"
url="hotspots/narrow2.png"
keep="false"
ath="148.40974478377856" atv="37.99291683883356"
zoom="false" distorted="true" details="8" flying="0"
width="40" height="85"
scale="1" scale9grid="" scalechildren="false" rotate="0"
rx="-8.25" ry="35.5" rz="72.82739523357115"
edge="center" ox="" oy=""
crop="" ondowncrop="" onovercrop=""
visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true" maskchildren="false"
zorder="0"
alpha="0.6" autoalpha="false" blendmode="normal" effect="" smoothing="true" pixelhittest="false"
refreshrate="auto"
onhover="set(alpha,1.0); showtext('Ванна кімната',hotspottextstyle);"
onout="set(alpha,0.6);"
onclick="lookto(154.07,4.13,60,smooth(90,90,105)); loadscene('slider',null,MERGE,BLEND(1));"
/>
</scene>
<scene name="slider">
<view hlookat="8.98" vlookat="-1" limitview ="lookat" hlookatmin ="-20" hlookatmax ="+35" vlookatmin ="-2" vlookatmax ="-2" fovtype="HFOV" fov="110" fovmin="60" fovmax="140" />
<plugin name="slider_bg" url="slider_background.png" align="bottom" x="0" y="30" handcursor="false" zorder="1" />
<plugin name="slider_grip" url="slider_grip.png" align="left" edge="center" parent="slider_bg" x="0" zorder="2"
dragging="if(pressed,
sub(dx, mouse.stagex, drag_stagex);
add(newx, drag_currentx, dx);
if(newx LT 0, set(newx,0));
if(newx GT plugin[slider_bg].pixelwidth, copy(newx,plugin[slider_bg].pixelwidth));
copy(x,newx);
div(val, newx, plugin[slider_bg].pixelwidth);
setblend(get(val));
delayedcall(0,dragging());
);"
ondown="copy(drag_currentx,x); copy(drag_stagex,mouse.stagex); dragging();"
/>
<action name="addface">
addhotspot(%1);
set(hotspot[%1].url, %2);
set(hotspot[%1].ath, %3);
set(hotspot[%1].atv, %4);
set(hotspot[%1].width, 1000);
set(hotspot[%1].height, 1000);
set(hotspot[%1].distorted, true);
set(hotspot[%1].enabled, false);
if(isflash, set(hotspot[%1].visible, false));
set(hotspot[%1].alpha, 0.0);
set(hotspot[%1].details, 16);
<!--set(hotspot[%1].zorder, %1);-->
</action>
<action name="addcube">
addface(face_%1_F, '%CURRENTXML%/panos/slider/%1_f.jpg', 0, 0);
addface(face_%1_L, '%CURRENTXML%/panos/slider/%1_l.jpg', -90, 0);
addface(face_%1_R, '%CURRENTXML%/panos/slider/%1_r.jpg', +90, 0);
addface(face_%1_B, '%CURRENTXML%/panos/slider/%1_b.jpg', +180, 0);
addface(face_%1_Z, '%CURRENTXML%/panos/slider/%1_u.jpg', 0, -90);
addface(face_%1_N, '%CURRENTXML%/panos/slider/%1_d.jpg', 0, +90);
</action>
<action name="setalpha" devices="flash">
set(%1.alpha, %2);
if(%1.alpha == 0.0, set(%1.visible,false), set(%1.visible,true));
</action>
<action name="setalpha" devices="html5">
<!-- safari has some framerate stops/problems when toggling the visibility - so keep here the spots always visible -->
set(%1.alpha, %2);
</action>
<action name="setcubealpha">
setalpha(hotspot[face_%1_F], %2);
setalpha(hotspot[face_%1_L], %2);
setalpha(hotspot[face_%1_R], %2);
setalpha(hotspot[face_%1_B], %2);
setalpha(hotspot[face_%1_Z], %2);
setalpha(hotspot[face_%1_N], %2);
</action>
<action name="start">
addcube(pano1);
addcube(pano2);
setblend(0);
</action>
<action name="setblend" devices="flash">
sub(blend2, 1.0, %1);
setcubealpha(pano1, %1);
setcubealpha(pano2, get(blend2));
</action>
<action name="setblend" devices="html5">
set(blend1, %1);
sub(blend2, 1.0, %1);
copy(hotspot[face_pano1_F].alpha, blend1);
copy(hotspot[face_pano1_L].alpha, blend1);
copy(hotspot[face_pano1_R].alpha, blend1);
copy(hotspot[face_pano1_B].alpha, blend1);
copy(hotspot[face_pano1_Z].alpha, blend1);
copy(hotspot[face_pano1_N].alpha, blend1);
copy(hotspot[face_pano2_F].alpha, blend2);
copy(hotspot[face_pano2_L].alpha, blend2);
copy(hotspot[face_pano2_R].alpha, blend2);
copy(hotspot[face_pano2_B].alpha, blend2);
copy(hotspot[face_pano2_Z].alpha, blend2);
copy(hotspot[face_pano2_N].alpha, blend2);
</action>
</scene>