Html5, javascript hide/show hotspots

  • Hi!

    I'm trying to make an "on top layer" to filter out different types of hotspots. This should be controlled by javascript. But is there a method that can get me the hotspots from javascript (when the pano is embeded with html5)

    tnx.

  • Hi

    Thank you for the links Andrey.
    No problem getting the example to work. I have even found a example here that should give me the hotspots, but from what i can see that example is for the flash version and not the html5..

    Code
    var krpano = document.getElementById('krpanoSWFObject');var hotspot_count = krpano.get('hotspot.count');
    for(i = 0; i < hotspot_count; i++){
          console.log(krpano.get('hotspot[ ' + i + '].name'));
          krpano.set('hotspot[' + i + '].alpha', 0.5); }


    The hotspot count gives me 0.. And I have a lot of them :)

    /**** EDIT ****/

    Got it to work.. The stupid ' ruined everything.. :) When I changed them to " everything worked like a charm :)

    Einmal editiert, zuletzt von l0ddifyr (19. April 2013 um 14:02)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!