Hide/show hotspots

  • Hello,
    I have read a lot of posts about hide and show hotspots with no luck...

    I just want to have a button to turn on and off the hotspots and I would like to use the hide/show skin button (that arrow looking down inside a circle on the right side of the skin bar). So when I hide the skin also the hotspots go away, in that way I have a "clean" view of the panorama.

    I tryed to use Klaus codes and added them on the vtourskin.xml...I added the two actions for hide and show the hotspots, and added thouse actions on the "onclick" to the button of the show/hide skin:


    When I click the button, it all works well, the skin and hotspots go away.... but when I click again to show again the skin and the hotspots, two new buttons (next and previous pano) and a cursor (pointer) in the middle of the screen appear...see image below

    I have no idea of coding *wacko* ,so a bit of help would be really apreciated, thank you!

  • Try using shutdown alpha instead of visible


    set(hotspot[get(i)].alpha ,0);


    set(hotspot[get(i)].alpha ,1);

    Thank you very much!
    That worked as expected!

    Now, just have one last question, as the hotspots are still active, if I click on them and go to the next panorama, they are visible again, but not the menu skin...is there a way to keep those hotspots hided when going through panoramas with the menu hided?

    thanks again


  • Here is an example code for showing hotspots


    For local hotspots, disconnection must be done at the start of the scene, because changes to the hotspot are not saved if you exit the scene

    Thank you very much again...I tryed your code on the vtourskin.xml and then the tour could not be loaded...so I tryed it on the "tour.xml" but with no luck, the tour loads but it makes no difference...

    Anyway I think that what I am trying to achieve is far more simple than this code...I do not need to save the states of the hotspots for the next time I open the scene (I guess when you say scene, is the whole virtual tour)...I am doing a virtual tour, so the problem is that when I hide the skin (and now thanks to you also the hotspots) and I go to the next panorama of the tour through a hotspot that is hidden, when the next panorama is loaded, the skin is hidden but the hotspots of this next panorama are visible...so is there a way to make the hotsposts and the skin to behave in the same way? in order to keep them hidden while the skin is also hidden...it is just to give the change to the user to see a "clean" panorama without any disturbing hotspots or menus in screen

    thank you!


  • You can change the hotspot while in an open scene, but if you exit and return to this scene, the hotspots will be set to the starting values, so you need to remember the state.
    Make a flag for opening and closing hotspots and depending on the state of the flag when loading scenes, set the visibility of hotspots


    ok, I understand the logic of it, but as I have no coding skills at all, do not know how to do this flags, is there any example in the documentation or somewhere else to follow it and try to write that code?

    thank you!


  • THANK YOU very much!! *thumbsup* *thumbsup*

    I had to add the same code to some other places, like the prev/next arrows, thumbails and also to the hide skin button, but at the end I managed to achieve what I was looking for!!

Jetzt mitmachen!

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