[SOLVED]Hotspot move after click and wait the mouse cursor back on it to achieve action stack

  • Hi,

    i got hotspot over my pano (arrow on virtual floor), then when i click on it, i center my pano around this hotspot and level the vertical to zero before loading another pano,
    so if the hotspot was outside the screen centre,
    after the click it center itself (at the same time the mouse cursor stay at the clicking position) and after centering, there like a freeze time (4-5-6 secondes...or more) until i place again the mouse cursor over the hotspot (or over a map marker if map plugin is beside),
    i've tried to set the actions inside the ondown="" or onup="" instead of onclick="" but with no effects...

    here the code hotspot :


    with only : onclick="action(loadpano06);" it works fast a expected;
    i've tried too to supress the wait(); in the onclick="" but with no results..

    strangely it seems all is normal if the cursor remains over the hotspot when it moving or at the end of his move,
    so the issues seems here, but how to fix it ??

    Thanks

    2 Mal editiert, zuletzt von zadda (25. November 2010 um 15:11)

  • i find a workaround *w00t* :
    since with only : onclick="action(loadpano06);" it works fast a expected;

    i setup a delaycall (so loadpano is still first action) :

    Code
    onclick="delayedcall(3, action(loadpano06); );lookto(-2.63,0,80,smooth(100,50,100))"


    with that, pano load normally after hotspot centering (without need to put cursor over it again)

    this solution not clean but at least just works,
    but i'm wondering if there a way to setup the delay just after the lookto, instead of the 3 secondes (not precise timing) delay ?? *confused*

    because i've tried delay 2 secondes on very large screen, and if the lookto is not finish yet before the delay, the loadpano doesn't trigger... until i put cursor on hotspot again..

    Thanks

    z

  • well,

    i'm trying to find another clean solution to my work-around,
    with :

    Code
    lookto(toH,toV,fov*,motiontype*,shortestway*)
    looktohotspot(hotspotname,fov*,motiontype*,shortestway*)
    moveto(toH,toV,motiontype*)


    but i encounter the same freezing problem...

    for reminder : my hotspot is on the floor (atv=12), onclicking on it, i want centering it with atv=0, and load a new pano :
    if i do that :

    Code
    looktohotspot(hotspot_to_pano05);
    action(loadpano05);


    the hotspot center in the pano (but lookt down at atv=12, and load a new pano , without freezing time)

    then,the solution here seems pretty simple : adding a tween to the atv at 0 , but it doesn't works as expected , see below :

    Code
    looktohotspot(hotspot_to_pano05);
    tween(view.vlookat, 0,  1.0, easeOutQuad, wait);
    action(loadpano05);


    here, after centering the hotspot,leveling the horizon,there a freezing time, pano won't load until there an user action (bring back mouse cursor over the hotspot or over map marker...)

    i've tried many combination with moveto, lookto, lookat...etc and still same problem, really get me mad *cursing*

    may be i am missing someting in documentation *confused* ,

    but for now my conclusion is : there a missing parameter in looktohotspot :
    looktohotspot(hotspotname,fov*,motiontype*,shortestway*,toV*)
    the toV will overwrite the atv of the hotpots, because we want centering the hotspot before loading a new pano but not looking down at the ground
    (in case hotspot are arrow on floor and with ath different of 0°)

    in case you got another solution , let me know *smile*

    z

  • sorry, I'm not sure what you want to do...?

    my english is not so good ? *unsure*


    to sum-up :
    -there a hotspot in my pano
    -this hotspot is on the floor (atv=12) under the horizon level.
    -if i click on it :
    -i want pano center around it And vlookat=0 (horizon level)
    -i want new pano load then

    my problem - as explained in post above - is when centering around the hotspot it keep the atv=12,
    and all work-around to both center the hotspot and leveling to the horizon result in freezing load new pano (for some strange reasons)

    is it more understandable ??

    z *smile*

  • Hi,

    okay, you want to look just at the horizontal hotpot position and ignore the vertical hotspot position, right?

    you could do that by using lookto instead of looktohotspot,
    e.g.

    Code
    lookto(get(hotspot[hotspot_to_pano05].ath), 0, 40);

    best regards,
    Klaus

  • okay, you want to look just at the horizontal hotpot position and ignore the vertical hotspot position, right?

    you could do that by using lookto instead of looktohotspot,
    e.g.

    Source code

    lookto(get(hotspot[hotspot_to_pano05].ath), 0, 40);


    you got it *wink*
    ya this is a more elegant solution.
    thanks *smile*

    but after modified the code as is :

    Code
    lookto(get(hotspot[hotspot_to_pano05].ath), 0, 40);
    action(loadpano05);


    there was still the hang time...then i investigate further, and i found the reason :
    in my action(loadpano05); there many things and there a callback function :

    Code
    <action name="loadpano05">
    ...other stuff here...
    update_infos(%1);<!--  call function update_Pano_infos in interface plugin -->
    loadpano(panos/05/params.xml,null,KEEPBASE|KEEPPLUGINS,BLEND(1));
    ...other stuff here...
    </action>


    and because the line update_infos(%1); was BEFORE :

    Code
    loadpano(panos/05/params.xml,null,KEEPBASE|KEEPPLUGINS,BLEND(1));


    the callback function was trigerred but hang/freeze at the same time the following loadpano line...
    by placing update_infos(%1); AFTER loadpano(panos/05/params.xml,null,KEEPBASE|KEEPPLUGINS,BLEND(1));
    there no more hang on :

    Code
    <action name="loadpano05">
    ...other stuff here...
    loadpano(panos/05/params.xml,null,KEEPBASE|KEEPPLUGINS,BLEND(1));
    update_infos(%1);<!--  call function update_Pano_infos in interface plugin -->
    ...other stuff here...
    </action>

    OK , this bug fixed,next one *tongue*


    z

Jetzt mitmachen!

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