[Golist] SkipTo question
James Bligh
jasbligh at gmail.com
Mon Oct 20 08:24:13 PDT 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://goasap.org/pipermail/golist_goasap.org/attachments/20081020/45be3636/attachment.html>
More information about the GoList
mailing list