I would like to use a placeholder for hotspots direction1...direction48 in order not to repeat setblend action in each scene (also all hotspot have to be declared at the begining of the xml for practical reasons)
how do I manage these placeholders. I looked at tutorials, but I don't understand all...)
declaring hotspots :
Code
<hotspot name="direction1" style="hotspot_anim" zorder="5" visible="true" enabled="true" ath="-232" atv="-32" keep="true" onclick="loadscene(scene1, null, MERGE, BLEND(1)); " />
<hotspot name="direction2" style="hotspot_anim" zorder="5" visible="true" enabled="true" ath="-102" atv="22" keep="true" onclick="loadscene(scene2, null, MERGE, BLEND(1)); " />
...<hotspot name="direction48"...
hide hotspots at start :
Code
<action name="start">
set(hotspot[direction1].visible,false);
set(hotspot[direction2].visible,false);
...set(hotspot[direction48].visible,false);
</action>
making first hotspot visible in scene :
Code
<scene name="scene1" onstart="action(startscene);set (hotspot[direction1].visible,true ));">
addcube(pano1);
addcube(pano2);
setblend(0);
</scene>
setblend action in global.xml :
Code
<action name="setblend">
<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));
if(newx LT 0.5, set (hotspot[direction1].visible,true ));// if slider_grip is on pano1, direction1 is visible
if(newx LT 0.5, set (hotspot[direction2].visible,false ));//if slider_grip is on pano2, direction2 is not visible
if(newx GT 0.5, set (hotspot[direction1].visible,false ));//if slider_grip is on pano2, direction1 is not visible
if(newx GT 0.5, set (hotspot[direction2].visible,true ));//if slider_grip is on pano2, direction2 is visible
(.../... removed useless script) );"
/>
</action>
Display More
Can someone help me for this ?
Thanks
Philippe