stoptween doesn't work when tween is set from onidle event

  • Hi,

    I was encountering a problem that I will detail bellow.

    On idle event, I start to run an autorotation (through different positions).
    These positions are defined by "scenepoint" elements in the XML.

    The script tweens hlookat, vlookat and fov and when the timer is out, it tweens to the next position.

    This codes works very well when there is no scene loading.

    Here is the code :

    But when I try to load a scene by a click on a thumbnail, the stoptweens doesn't work.
    Even when I call interruptScenarisation() at the beginning of startScenarisation().

    Here is the scene loading code.

    Code
    loadscene(myscene,null,MERGE,BLEND(1));

    I try to make a wait(1) at the beginning of startScenarisation() but I have still the same problem.
    The only way I have found to stop the tween is to make a mousedown event (calling interruptScenarisation() before clicking on the thumbnail).

    If anyone has a solution...
    Thank you

  • Mea culpa,
    I didn't call interruptScenarisation at the right place before loading scene and it seems that when the new scene is loaded, it's too late to stop tweens but before it's ok.
    Sorry

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!