Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Donnerstag, 18. April 2013, 13:11

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.

2

Donnerstag, 18. April 2013, 16:10

Hi!
take a look here
and here

Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

3

Freitag, 19. April 2013, 10:23

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..

Quellcode

1
2
3
4
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 :)

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »l0ddifyr« (19. April 2013, 14:02)