View Full Version : hide hotspots
behrda
08-09-2007, 05:14 PM
hi denis and all others,
is it possible to hide all hotspots with one click? I thought about an alpha increase or sth. else and I donґt want to change the parameter of each hotspot one by one...
Can you tell me, how I can solve this?(a global function???)
thanks dario
Hi Dario. One solution is to write a function - here's a simple example, I'm sure there are more elegant solutions but this should work:
<!-- Between the global tags write a function eg. -->
hideHotspots="hotspot1.visible=0;hotspot2.visible=0;hotspot3.vis ible=0"
<!-- Call the function from your 'hide hotspots' button -->
<spot id="hideHotspots" url="hide.png" static="1" onClick="hideHotspots()" />
You'll probably want to have the ability to show the hotspots again - you can do this with a second function:
<!-- Between the global tags add a button swap command write another function eg. -->
showHotspots="hideHS.visible=0,showHS.visible=1;hotspot1.visible =1;hotspot2.visible=1;hotspot3.visible=1"
hideHotspots="hideHS.visible=1,showHS.visible=0;hotspot1.visible =1;hotspot2.visible=1;hotspot3.visible=1"
<!-- Add a 'show hotspots' button -->
<spot id="hideHS" url="hide.png" static="1" onClick="hideHotspots()" />
<spot id="showHS" url="show.png" static="1" onClick="showHotspots()" />
You can make the change smoother by adding an alpha transition over time (see Denis's examples).
Hope this helps,
Neil
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.