Hotspots Visible Toggle

  • Hello
    is there a way to toggle the hotspots visible a different way instead of...
    onclick="switch(hotspot.visible);"
    ----- the spots hide off/on this way but they are Not Hot when off - I would like to hide the hotspots but make them still clickable and let the end user hide/show them visually as they prefer.


    I tried to use onclick="switch(hotspot.alpha);" --- but when they hide the spots will not turn visible again when clicked


    also...


    is there a way to make All the hotspots hide by default when the scene first loads?


    *rolleyes* Thanks!!


    Kent

  • Hi,

    I tried to use onclick="switch(hotspot.alpha);" --- but when they hide the spots will not turn visible again when clicked

    the switch() action switches by default between "true" and "false", but "alpha" is a value from "0.0" to "1.0",
    you could use:

    Code
    onclick="switch(hotspot.alpha, 1, 0);"

    to switch between visible(alpha=1) and invisible(alpha=0), the hotspots should be still clickable in this case


    is there a way to make All the hotspots hide by default when the scene first loads?

    e.g.

    Code
    <krpano onstart="set(hotspot.alpha,0);" />


    or:

    Code
    <events onxmlcomplete="set(hotspot.alpha,0);" />

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!