• Hello all!

    I'm creating pano with some extracted hotspots.

    I need to load first hotspot (priborka.jpg) at start.
    Then i need to disable/enable it by tap at second hotspot (priborka_btn).

    Here is my code:

    <hotspot name="priborka" capture="false" handcursor="false" alpha="0"
    url="panamera.tiles/priborka.jpg"
    distorted="true"
    onloaded="calc_pos_from_hfov_yaw_pitch_roll(39, 13.906, 19.316, -0.913);"
    onclick="switch(alpha,0,1);"
    />
    <hotspot name="priborka_btn" style="knopka" ath="0" atv="17"/>


    How to do it?

  • Hi Klaus, thank you!

    You answered at my 2nd question.
    But how to make priborka.jpg loaded at pano start?


    <hotspot name="priborka" capture="false" handcursor="false" alpha="0"
    url="panamera.tiles/priborka.jpg"
    distorted="true"
    onloaded="calc_pos_from_hfov_yaw_pitch_roll(39, 13.906, 19.316, -0.913);"
    onclick="switch(alpha,0,1);"
    />

    Edited 2 times, last by rankov (September 29, 2014 at 11:20 AM).

  • Hi Klaus,

    Thank you for reply. I've tried it, but this code makes nothing. When i set visible="true", image appears, but fill the whole screen. What's wrong here?

  • Klaus, i need to preload the image from this hotspot. Distorted and with pixel alignment.

    <hotspot name="priborka" capture="false" handcursor="false" alpha="0"
    url="panamera.tiles/priborka.jpg"
    distorted="true"
    onloaded="calc_pos_from_hfov_yaw_pitch_roll(39, 13.906, 19.316, -0.913);"
    onclick="switch(alpha,0,1);"
    />

    I made it with this instruction
    Example/Tutorial - Extract a Distorted Hotspot from any kind of Pano Image (with perfect pixel alignment)


    It fits perfectly, but i just need to load it automatically, without click.

  • Ok, it works. I changed alpha and priborka.jpg appears at start.

    I have a button over it, to switch alpha for this hotspot.
    <hotspot name="priborka_btn" style="knopka" ath="-14.5" atv="21.5" onclick="switch(hotspot[priborka].alpha,0,1);"/>


    Now this button became hidden. How to bring it to front and hide after switch "priborka" alpha?

  • If the hotspots are at the same location, order them by setting different zorder setting for them.
    And to make them alternately visible, set different visible setting and change both on click:

    e.g. (remove your old alpha code)

    Code
    <hotspot name="priborka"     ... zorder="1" visible="false" onclick="set(visible,false); set(hotspot[priborka_btn].visible,true);" />
    <hotspot name="priborka_btn" ... zorder="2" visible="true"  onclick="set(visible,false); set(hotspot[priborka].visible,true);" />

Participate now!

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