[Tweener] possible to tween a variable (not a property of a movie clip)

Zeh Fernando zeh at zehfernando.com
Thu Oct 9 16:06:44 PDT 2008


You do the same thing, just with a reference to "this":

Tweener.addTween(this, {speed: 55,time:.5});

The problem is, if they're a real variable, you cannot tween them. They
cease to exist the moment the function/method call has ended. If you want
them to continue existing, they must be a member of the current movieclip -
declared outside in the class in case of an actionscript class, or in the
"main" timeline code in case of code written directly on the Flash timeline.

Zeh

On Thu, Oct 9, 2008 at 7:13 PM, Mike Heavers
<mheavers at maverickdigital.net>wrote:

>
> Hey - can anyone tell me if there's a way to use tweener to tween variables
> that aren't properties of a movie clip - for example say you have a variable
> like:
>
> var speed:number = 20
>
> and do a tween
>
> Tweener.addTween(?, {speed: 55,time:.5});
>
> to tween the speed variable from 20 to 55?
>
>
> --
>
>
>  MIKE HEAVERS
>  MAVERICK DIGITAL <http://www.maverickdigital.net>
> 20 W 22ND STREET SUITE 1108
> NEW YORK, NY 10010
> 212.337.8004
> 212.627.2977
> mheavers at maverickdigital.net
>
> _______________________________________________
> 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/20081009/920e3438/attachment.htm>


More information about the Tweener mailing list