GREAT!!!!!!!
Tuur
GREAT!!!!!!!
Tuur
can't get this to work on html5
<action name="hidehtsp">
for(set(i, 0), i LT hotspot.count, inc(i),
if(hotspot[get(i)].id == hotspot,
helperaction(get(i));
);
);
</action>
<action name="helperaction">
set(hotspot[%1].visible,false);
</action>
Display More
and then call ondown="hidehtsp();"
what is wrong?
Tuur
Quoteor ensure each hotspot you are doing this too has id="hotspot" in it.
that seems not to work..
will try again later.
Tuur
Make your tag anything other than "hotspot".
What exactly are you trying to do?
let hotspots disapear n ipad..
""Make your tag anything other than "hotspot".""
that's it!
thx
edit: sacha wrote:
Tuur, it's just ...
set(hotspot.visible,false);
not working on ipad..!!
http://virtualtuur.com/krpano/hotspot/
Tuur
I've been trying to decode the programmer speak here and can't get a group of hotspots to dynamically toggle on/off. They all are on or all off. The problem is that I don't want the video hotspots to turn off and there are about 50 hotspots I do want to toggle.
In this example I have a black button toggle the red & white buttons on and off. How do I use the ideas in this thread to make only the white buttons tagged with img turn off?
Thanks,
Phil
<krpano version="1.16" onstart="">
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />
<style
name="hs_base1" url="%SWFPATH%/plugins/textfield.swf" width="70"
height="70" scale="1" background="true" backgroundcolor="0xffffff"
backgroundalpha="1" border="false" bordercolor="0xFFFFFF"
roundedge="130" shadow="0.1" shadowrange="10" shadowcolor="0x000000" zorder="2" zoom="true" visible="true"
/>
<style
name="hs_base2" url="%SWFPATH%/plugins/textfield.swf" width="70"
height="70" scale="1" background="true" backgroundcolor="0xff0000"
backgroundalpha="1" border="false" bordercolor="0xFFFFFF"
roundedge="130" shadow="0.1" shadowrange="10" shadowcolor="0x000000" zorder="2" zoom="true" visible="true"
/>
<layer name="on-off-button" url="%SWFPATH%/plugins/textfield.swf" align="bottom" y="50" width="81" height="81" scale="1"
handcursor="true" background="true" backgroundcolor="0x000000" backgroundalpha="1" border="false" bordercolor="000000"
roundedge="130" shadow="0.1" shadowrange="5" shadowcolor="0x000000" zorder="2" zoom="true" visible="true"
onclick="switch(hotspot.visible, false, true)"
/>
<hotspot name="hs1" tag="img" style="hs_base1" ath="-20" atv="20" />
<hotspot name="hs2" tag="img" style="hs_base1" ath="34.4" atv="-4.7" />
<hotspot name="hs3" tag="vid" style="hs_base2" ath="-1.5" atv="-31.4" />
</krpano>
Display More
Is this what you want to achieve?
Link to example
Code
That's exactly what I wanted to achieve. Using your example and replacing backgroundcolor EQ '0xffffff' with tag == img it works perfect.
onclick="for(set(i,0), i LT hotspot.count, inc(i),if(hotspot[get(i)].tag == img, switch(hotspot[get(i)].visible,false,true)););"
Thank you for your help!
Phil
Hmmm...this only works with a single scene and the hotspots will turn back on when loading a new scene. What would need to be changed for it to work across multiple scenes? Can a hotspot use an If statement like this? visible="if(state=1,true,false);"
Is this what you want to achieve?
Link to example
Code
Phil
Please read about:
https://krpano.com/docu/actions/#loadscene
https://krpano.com/docu/xml/#hotspot.keep
Than take a look at this example:
Link
Code
(logo is loading new scene)
Don’t have an account yet? Register yourself now and be a part of our community!