[Tweener] Timer based Tweener

Zeh Fernando zeh at zehfernando.com
Thu Dec 3 14:34:36 PST 2009


>
> be changed since Tweener is considered a 'finished' project, but of course
> everyone can still modify it to add the feature.
>
I'd be willing to clear this off the todo list. Do you have any suggestions
> on what the API should look like, or alternative ways to get this to update?
>

Personally, my original idea was just having a separate 'fps' parameter, as
in:

Tweener.addTween(mymc, {x:10, fps:10, time:1, transition:"easeOutExpo"});

That'd trigger the use of a Timer for this particular tween, ignoring the
normal update cycle. This could get ugly - each tween with a custom FPS
would have a separate timer - but considering this is a sort of an uncommon
need, I guess it'd be good enough. Internally, it'd be as easy as having the
Timer as an instance, calling itself, and some way to properly detect when a
tween is finished and to remove itself from the poll.

I don't think there's a problem in people changing their copy of the class -
it'd probably make more sense than extending it.

But in all honesty, I'd check the other solutions - TweenLite, TweenMax,
GTween, etc - to see if they already got the feature added. It is something
that has popped up in discussions from time to time so I'm sure it's
something other people have needed before.

Zeh


> There doesn't seem to be a way to get a reference to the controller
> MovieClip from outside of the Tweener class (to dispatch the event as I've
> done, or to cancel it an use an alternative method) - nor does there seem to
> be a way to override the startEngine function.
>
> Even a subclass probably wouldn't work (that'd be ugly anyway).
>
> Any ideas on how to do this without changing the core (or would smaller
> changes, like private to protected be ok)?
>
>
> Kevin N.
>
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20091203/21252618/attachment.htm>


More information about the Tweener mailing list