oninterrupt by onloadcomplete

  • I have a panorama that turns after loading (onloadcomplete). But some people are too quick and before the tween even started, they clicked to go to another pano, or turned the pano themselves. Then my pano is loaded and will turn, or the new loaded pano will do the turn. These two things are not what I want. I even don't want to do the tween before the pano is fully loaded.

    What I want: when someone turns the pano before the load is complete or goes to another pano, the onloadcomplete event will not load.
    Oninterrupt only works when the onloadcomplete event already started (then it works well).

    Another solution can be that the user can't do anything before my tween did his work, but I think I don't want that.

    Is there any solution?

    Code:

    Example:
    http://iolar.nl/vt/metscenter/…%28gang1.xml%29;

  • Ok, I changed the action to the onstart, because when I call the action in onxmlcomplete, then every pano after the one I looked at will do the tween. How to stop that? set(event.onloadcomplete,null); won't work (I put it at the end of the action 'starttour').

    Einmal editiert, zuletzt von maaike (3. Oktober 2010 um 15:24)

  • Hi maaike,

    Try adding a WAIT flag to the tween action:

    Code
    <action name="starttour">
     oninterrupt(stopall());
     tween(view.hlookat,337,8,easeInOutSine,WAIT);
     wait(1);
     </action>

    Have a look to this post from KLAUS: oninterrput not working

    SAlut.

    Ok that worked. I also added <event onloadcomplete="" /> to every other pano (which I don't like I have to do it like that, but it works).

    But now I want to stop the event before it even started (if someone turned the pano himself). For example if it's turned more than 10 degrees or so, I will not let the onloadcomplete work.

Jetzt mitmachen!

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