Hello,
I have read a lot of posts about hide and show hotspots with no luck...
I just want to have a button to turn on and off the hotspots and I would like to use the hide/show skin button (that arrow looking down inside a circle on the right side of the skin bar). So when I hide the skin also the hotspots go away, in that way I have a "clean" view of the panorama.
I tryed to use Klaus codes and added them on the vtourskin.xml...I added the two actions for hide and show the hotspots, and added thouse actions on the "onclick" to the button of the show/hide skin:
<layer name="skin_btn_hide" style="skin_base|skin_glow" crop="0|448|64|64" align="right" x="50" y="0" scale="0.5" onclick="skin_hideskin(); hide_hotspots();" />
<layer name="skin_btn_show" type="container" bgcapture="true" align="bottom" width="100%" height="get:skin_settings.controlbar_height" y="calc:skin_settings.controlbar_height - skin_settings.controlbar_offset_closed" onclick="skin_showskin(); show_hotspots();" onhover="tween(alpha,1.0);" onout="tween(alpha,0.25);" ondown.touch="onhover();" onup.touch="onout();" visible="false" capture="false" alpha="0.0">
<layer name="skin_btn_show_icon" style="skin_base" crop="64|448|64|64" scale="0.5" align="bottom" y="2" enabled="false" />
</layer>
<action name="hide_hotspots">
for(set(i,0), i LT hotspot.count, inc(i), set(hotspot[get(i)].visible,false); );
</action>
<action name="show_hotspots">
for(set(i,0), i LT hotspot.count, inc(i),
set(hotspot[get(i)].visible,true);
);
</action>
Alles anzeigen
When I click the button, it all works well, the skin and hotspots go away.... but when I click again to show again the skin and the hotspots, two new buttons (next and previous pano) and a cursor (pointer) in the middle of the screen appear...see image below
I have no idea of coding ,so a bit of help would be really apreciated, thank you!