[Golist] SkipTo question

Moses Gunesch moses at goasap.org
Mon Oct 20 11:56:00 PDT 2008


Hey there James, thanks for your email.

You're right, that seems broken. Maybe try setting a temp var like,  
var base:Number = (_useFrames ? _framesBase : 0); and using that var  
instead of _framesBase in that (time < _framesBase) block.

Let me know if that helps, we can integrate it.

Also -- I was working on a version that eliminates framesBase  
altogether, to reduce clutter. Hopefully will have time to return to  
that soon!

- moses


On Oct 20, 2008, at 11:24 AM, James Bligh wrote:

> Just starting to use Go, I think its great so far.
> First problem I can't understand is with the skipTo method.
>
> I'm using the skipTo method with the LinearGo class, no delays set  
> and using time based not frames
>
> The description says tweens start at 0 and negative numbers  
> represent delays.
> On line 645 of LinearGo.as there is a check if the number is negative
>
> if (time < _framesBase) { // Negative value: rewind and add a new  
> delay.
>     _repeater.reset();
>     if (_position>0) { skipTo(_framesBase); }
> }
> else {
>     time = _repeater.skipTo(_duration, time-_framesBase);
> }
>
> _framesBase defaults to 1,
> this causes a skipTo(1) to skipTo the start of a Tween.
> skipTo(0) or skipTo(0.5) ie skipTo(<1) all skipTo the correct part  
> of the tween because time is less than 1 and passes the if
> statement at line 645
> skipTo(1) takes the else, which calls Repeater.skipTo(duration,0)  
> which, in the case where no repeats are set, will just return the  
> amount passed, in this case 0 (time:1-_framesBase:1). So instead of  
> skipping to 1 second the method skips to the start.
>
> So I could fix this behaviour easy enough, but chances are I'm  
> missing something, and changing it will just break something else,  
> so I defer to the experts.
> Thanks,
> James
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://goasap.org/pipermail/golist_goasap.org/attachments/20081020/6f090cba/attachment.html>


More information about the GoList mailing list