can't seem to get stop / stopall() / breakall()

  • I'm playing around today and am having difficulty "stopping" an action.

    I have a simple move action...

    Code
    <action name="move">
    		tween(plugin[button].x,500,distance(500,5),linear);
    		tween(plugin[button].y,500,distance(500,5),linear);
    	</action>

    It is called with an "onover" event from another image plugin.

    I'm trying to use the "onout" event to stop the movement... but regardless of what I try, I can only get the tween...x to stop. It is the first tween listed.

    If I switch the order of the tweens... and put tween...y first, then it is stopped by the onout event.

    I've tried the following for the onout...

    Code
    ---
    onout="breakall()";"
    ---
    onout="stop(action(move));"
    ---
    onout="stopall();"
    ---

    All behave the same way.

    So, what is the proper way to stop both tweens?

    I've tried on both 1.0.7 and 1.0.8b5 and am using the standalone flashplayer v9.

    Thanks,
    Graydon

  • Quote

    a tween can currently only be stopped through a other tween of the same variable

    OK... but if my move action is just...

    Code
    <action name="move">
    tween(plugin[button].x,500,distance(500,5),linear);
    </action>

    ...then any stop / break used did stop the single tween.

    I also just tried the following:

    Code
    onover="tween(plugin[thumb].x,500,distance(495,5),linear);"
    onout="breakall();"


    Code
    onover="tween(plugin[thumb].x,500,distance(495,5),linear);"
    onout="stopall();"

    ... and the single tween stopped.

    But, this acted the same...

    Code
    onover="
    tween(plugin[thumb].x,500,distance(495,5),linear);
    tween(plugin[thumb].y,500,distance(495,5),linear);"
    onout="stopall();"

    Since I currently only really need to stop a single tween activity... I have a method that appears to work.

    But, a stoptween() action could be handy for something in the future...

    Maybe a stopaction() action that disrupted the action at it's current state... i.e.. set any tween values, zooms, view, etc... at the current state would work. But then someone would want a "onstop" or "onstopaction" event capability that could be defined within an action so that they could properly handle the "what-ifs".

    The "onstop" would be similar to "oninterrupt"... but with "oninterrupt" set by a mouse click... and "onstop" set by another action.

    It's making my head hurt... I'll trust in you to come up with a fabolous solution. *g*

    Graydon

  • Hi,

    you're right - with breakall() and stopall() - the tweens are also stopped

    the difference between breakall and stopall is:

    - on both all tweens and actions are stopped
    - on breakall - the "done action" (=last parameter in a tween call) is executed after stopping

    I have added now a stoptween() action, I will release it soon

    best regards,
    Klaus

Participate now!

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