[Tweener] init, startEngine, setTimeScale etc
David Eriksson
bbs at fatslice.com
Sun Jun 17 16:52:03 PDT 2007
hi,
checked the tweener and like the structure and it's compactness.
anyway, got a few questions / suggestions. (one leads to another)
# setTimeScale
I think this call should affect all running + upcoming tweens. Now
it's only for those already running.
It also has a "bug" as it can't be called if no tween is running.
I can see that many methods got the if _tweenlist return thing, but
not this one
that leads us to the next #
# _tweenList
I'd suggest to never set this Array to null!
1) private static var _tweenList:Array = [];
2) if just splicing untli zero-length, you could remove all those
"extra"
if (!Boolean(_tweenList)) return false;
Not that it's a performance thing but letting the for loops do the skip
will take less time then initting a new Array every time.
# finally, why all those if (!_inited) init(); etc.
Shouldn't this class just init itself when first imported!?
also, only way to start/init the things that happen in pricate
startEngine
is to make a call to addTween.
best
/d
More information about the tweener
mailing list