[Solved] make hotspot invisible in little planet works with Flash , not HTML5

  • Hi,

    little problem again,
    when i add dynamically hotspots with addhotspot,
    and i want them invisible for little planet view,
    the following code not works in html5 but works in flash

    Code
    set(hotspot.visible, false);

    with normal hotspots (not by addhotspot)
    code works in flash and html5
    krp.119.pr2

    why ?

    thanks

    z

    Edited once, last by zadda (September 6, 2015 at 1:19 PM).

  • Hi,

    the hotspot.visible, hotspot.alpha settings are currently Flash-only - see here:
    https://krpano.com/docu/html5/#supportedfunctionality

    In the Flash version all the hotspots are with an internal layer and these settings are controlling the visibility of that layer. The HTML5 used internally a different organization (due technical reasons) and therefore this is not directly supported there.

    Best regards,
    Klaus

  • Hi,

    here an action for hiding or showing all hotspots:

    Code
    <action name="set_all_hotspot_visible">
      for(set(i,0), i LT hotspot.count, inc(i), set(hotspot[get(i)].visible, %1) );
    </action>

    To hide all hotspots call:

    Code
    set_all_hotspot_visible(false);

    and for showing them:

    Code
    set_all_hotspot_visible(true);

    Best regards,
    Klaus

  • Thanks Klaus for replying

    but that not works *cry*

    not only my hotspot remain visible when entering little planet but the webVR hotspot target become visible when exiting ...
    and invisible when re-entering little planet, it mean your code is correct *thumbup* but it doesn't works on my hotspots.... *sad*

    my hotspots are added with addhotspot in an action like this :

    is there something to add ? *confused*

    Thanks

    z

  • Hi,

    please show your full example - e.g. when do you add your hotspots? only once at startup?

    And about showing and hiding only specific hotspots - you could add a custom attribute to them and then check in the for loop for that.

    Best regards,
    Klaus

Participate now!

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