• It might sound stoopid! this is a request from an older client Is there a way to add a "back button" When pressed it goes back to the last scene viewed. I create virtual tours with a lot of scenes, the last was 180 scenes! Sometimes people get lost or press the wrong button...

    Any help would be great!

  • Hi!
    Yes it's possible
    store current scene name in some variable when load new/next scene
    for example
    you have hotspot with onclick="loadscene(somescene);"
    then do so
    onclick="copy(prevscene,xml.scene);loadscene(somescene);"
    and in backbutton onclick="loadscene(get(prevscene));"
    That's all

    Andrey *thumbup*

  • HI Andrey!

    thats a great tip, thank you!

    Although I would prefer something that is more global. Each scene may have between 2-13 hotspots, so to add the code for all of them for 100+scene projects would be too laborious...

    but thanks for your answer!

    Rich

  • Hi!
    You can use some additional action
    for example:

    action name="hsOnclick"
    copy(prevscene,xml.scene);
    loadscene(%1);
    /action

    and in hotspot

    onclick="hsOnclick(somescene1);"

    or
    style name="hsStyle" ..... onclick="hsOnclick(get(linkedscene));"
    and
    hotspot name="hs2" style="hsStyle" .... linkedscene="somescene1" .... /
    hotspot name="hs3" style="hsStyle" .... linkedscene="somescene2" .... /

    Andrey *thumbup*

  • Just want to add (to this pretty old thread) that with the event onremovepano this variable can be written as well.

    Code
    <events onremovepano="set(global, prevscene:string=calc(xml.scene), placeholder:boolean=true);" />


    This will save the scene name to "prevscene" before the scene changes.

Jetzt mitmachen!

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