[Golist] SkipTo question

James Bligh jasbligh at gmail.com
Mon Oct 20 13:01:11 PDT 2008


Yeah that would fix it, thanks for that. especially the speed.

While I'm pointing out flaws, (I hope this is helpful)
In PlayableGroup.as line 408
    position = _repeater.skipTo(_repeater.cycles, position); // TODO: TEST

The repeater skipTo method takes the tween duration or sequence length as
it's first param
Passing in repeater.cycles doesn't seem to make sense in this case.

In my case I don't have repeats so repeater.cycles will be 1 and
repeater.skipTo will set position to 1!
So I've commented out this line as a work around.
So it's tested for that use case if that helps

At a guess I'd say you want to actually pass in _repeater.cycles *
durationOfGroup
but there is no method or var that represents the groups total duration.
James


2008/10/20 Moses Gunesch <moses at goasap.org>

> 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
>
>
>
> _______________________________________________
> 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/cf23e68f/attachment.html>


More information about the GoList mailing list