• can someone PLEASE help me figure out how to use this function!?!

    I want to make the panorama look to a specific hotspot when the page loads.
    On the page I have a hidden field with the hotspot name and I just want to set the initial panorama view to that hotspot.
    I'm going in circles and looking through documentation but don't know how to use lookathotspot function on page load.

    Thank you for your help in advance...

  • OK, so as I see no one has the answer for me so I want to clarify the matter and explain a little better in hopes that someone can show me the way.
    so here goes:

    here is my code for embedding panorama:

    <div class="span12perc" id="pano">
    <noscript>
    <table style="height:100%;">
    <tr style="valign:middle;">
    <td>
    <div style="text-align:center;">
    ERROR:<br/><br/>Javascript not activated<br/><br/>
    </div>
    </td>
    </tr>
    </table>
    </noscript>
    <script>
    embedpano({
    swf:"tours/tour1/tour.swf",
    xml:"tours/tour1/tour.xml",
    target:"pano",
    html5:"never",
    passQueryParameters:"true"
    });
    </script>
    </div>

    I have a hotspot name in a variable that I want to pass to the panorama and to user lookathotspot() to change the initial view to that hotspot.
    I read that you can set passQueryParameters to true and then use the parameters passed through url in the xlm, but I need and example how exatcly.

    I think that this url parameter must be used in startup action in xml but don't know how to.
    Please if someone can show me, really bugging me for days now... *cursing* *cursing* *cursing*

  • OK I finally managed to get this to work so here is my solution:

    in my XML I added the following line to the end of the file:
    <events onloadcomplete="looktohotspot(get(myHotspot),120, 'shortestway');" />

    and in my page when I called the panorama with embedpano I passed myHotspot variable like this:

    var fHotspot='shoes';
    embedpano({
    swf:"tours/tour1/tour.swf",
    xml:"tours/tour1/tour.xml",
    target:"pano",
    html5:"never",
    passQueryParameters: "false",
    vars: {myHotspot: fHotspot}
    });

    so when the panorama loads it automatically focuses on the desired hotspot!

    Thanks for everyone's help and I hope that I helped someone... *wink*

Jetzt mitmachen!

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