csk0921 / tweener

Automatically exported from code.google.com/p/tweener
0 stars 0 forks source link

Inside a "if" #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
I was wondering how come the tweenings are not working properly when you try to 
use it inside an 
"IF" condition...? (sorry for my bad english) Here is an extract of my code :

Thanks for your great help.
Stef

// ------------------------------------------
import caurina.transitions.Tweener;

setBackground = function () {
    centre_y = Math.round(Stage.height/2);
    if (_root.flag_panel == "true") {
        Tweener.addTween(menuCentre, {_y:centre_y-200, time:0.4, transition:"easeInOutQuart"});
    } else {
        Tweener.addTween(menuCentre, {_y:centre_y-100, time:0.4, transition:"easeInOutQuart"});
    }
};

Original issue reported on code.google.com by revi...@gmail.com on 12 Mar 2008 at 12:06

GoogleCodeExporter commented 8 years ago
There should be no issue when using Tweener calls inside an IF condition or 
other
known code block. There's a higher probability that something else on your code 
is
breaking your animation and giving you the impression Tweener is not working.

If you think this is not the case, please be more specific to what should be
happening, what's happening instead, and what other kind of tests you've done 
that
have shown the culprit is the Tweener code inside the IF block. I can't see 
anything
on your code that could even remotely make Tweener stop working.

Original comment by zisfor...@gmail.com on 12 Mar 2008 at 2:29