[Tweener] Tweener: Timeline based animations... How to play next frame?

Makc makc.the.great at gmail.com
Thu Dec 20 07:39:30 PST 2007


I see, thanks all.

On 12/20/07, Zeh Fernando <zehfernando at zeh.com.br> wrote:
> Yeah, something like that would work. Using an additional property (that
> is then applied to some other property) would too.
>
> But I think the best way to have something like - as long as a custom
> class was used - this would be with a getter/setter. That way all
> changes to the value (not only the ones done by the tweening engine)
> would snap to the rounded value.
>
> Zeh
>
> Cedric Muller wrote:
> > you could do the 'snapping' thing by using the 'onUpdate' handler ?
> > (off my head .... I hope it works)
> >
> > this.tObj = new Object();
> > this.tObj.pos = 0;
> > this.tObj.tgt = 50;
> >
> > this.snapToValue = 10; // in pixels
> >
> > public function snapTo ():void {
> >       this.snappedValue = Math.round(tObj.pos/snapToValue) * snapToValue;
> >       trace(this.snappedValue);
> >       //      assign this 'snappedValue' to whatever ...
> > }
> > Tweener.addTween(this.tObj, {pos:this.tObj.tgt,
> > transition:"easeInOutSine", time:5, onUpdate:snapTo});
> >
> > Cedric
> >
> >> Hm.. to use integers you use the parameter:
> >>
> >> rounded:true
> >>
> >> On addTween. But it has no option to round the values to a certain
> >> number of decimal places like that.
> >>
> >>
> >> Zeh
> >>
> >> Makc wrote:
> >>> Just re-iterating i, since I've got no reply, maybe you just havent
> >>> noticed me? If you do not reply this time, I will not re-send it
> >>> again.
> >>>
> >>> On 12/5/07, Makc <makc.the.great at gmail.com> wrote:
> >>>> perhaps this is not really related but, on the same note, how do I
> >>>> force tweener to set property to integers (or generally snap to some
> >>>> intervals) ?
> >>> what I mean is  instead of
> >>> 0
> >>> 0.122342...
> >>> 0.343534...
> >>> 0.5
> >>>
> >>> to have
> >>> 0
> >>> 0.12
> >>> 0.34
> >>> 0.5
> >>>
> >>> is this possible?
> >>>
> >>> Not that I can't live wthout it, but I just wonder if such option
> >>> is available.
> >>> _______________________________________________
> >>> Tweener mailing list
> >>> Tweener at lists.caurinauebi.com
> >>> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
> >>>
> >> _______________________________________________
> >> Tweener mailing list
> >> Tweener at lists.caurinauebi.com
> >> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
> >
> > _______________________________________________
> > Tweener mailing list
> > Tweener at lists.caurinauebi.com
> > http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
> >
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>


More information about the Tweener mailing list