Looktohotspot and back

  • Hi,

    yes that´s possible. Just write the actual ath and atv with the onclick-tag into a variable...
    set(old_hlookat,get(hlookat));
    set(old_vlookat,get(vlookat));

    and change the onclick-tag...
    set(onclick,
    tween(view.hlookat,get(old_hlookat),5);
    tween(view.hlookat,get(old_vlookat),5);
    set(onclick,set(old_hlookat,get(hlookat));
    set(old_vlookat,get(vlookat));
    );

    Not tested but with minimal changes this should work! You may want to put all this into a action.

    Best regards
    Nupsi

  • Hi, tnx for response tried modifying code for hotspot info1 onclick tag with this code:


    onclick="
    set(old_hlookat,get(view.hlookat));
    trace(Hlookat-,old_hlookat);
    set(old_vlookat,get(view.vlookat));
    trace(Vlookat-,old_vlookat);
    set(old_fov,get(view.fov));
    trace(Fov-,old_hlookat);
    looktohotspot(info1);
    set(onclick,tween(view.hlookat,get(old_hlookat),1);
    tween(view.vlookat,get(old_vlookat),1);

    tween(view.fov,get(old_fov),1););
    "

    It works for first time, but when it gets back after i don't know how to reset or set back onclick to go from begining like first time and do procedure again.

    Tnx again

  • Hi,

    just reset the onclick-tag like you did the first time:
    onclick="
    set(old_hlookat,get(view.hlookat));
    set(old_vlookat,get(view.vlookat));
    set(old_fov,get(view.fov));
    looktohotspot(info1);
    set(onclick,tween(view.hlookat,get(old_hlookat),1);
    tween(view.vlookat,get(old_vlookat),1);
    tween(view.fov,get(old_fov),1);
    set(onclick,....whatever were in the onclick-tag before);
    );
    "

    Like I said, it should be easyer and much more clearly if you put all this into an action. Or even two actions and just replacing the name of the action inside the onclick-event.

    Best regards
    Nupsi

Jetzt mitmachen!

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