[Golist] Go version 0.4.6

Moses Gunesch moses at goasap.org
Tue Apr 1 06:50:31 PDT 2008


Jan, it might be LinearGo but also can just be the way you've  
subclassed it.

In your subclass' onUpdate() method,
if you have code like,
	if (type==GoEvent.UPDATE) { // perform update... }
That won't work, it's wrong. It needs to perform the update EVERY  
time, regardless of the "primary type" passed to it. I should improve  
the docs under onUpdate() to explain the "primary type" logic there a  
little better....

At the end of normal tweens the "type" passed is COMPLETE, and for no- 
duration tweens this will be the only onUpdate call you get... so  
using that if statement would mean that your update code would just be  
skipped. For tweens with a longer duration the "type" passed in is  
START first, then UPDATE between start & complete.

The thinking on only having one "type" input in onUpdate() is just  
that it's simpler. In most cases where a tween is ending, your  
onUpdate code won't need to know that it's also starting. This could  
be a faulty assumption on my part, but a person can always change  
LinearGo for a project where that comes up, to pass more parameters to  
onUpdate()... or you could subscribe to the START event which should  
always be fired. For example in your case where the tween essentially  
has no duration, all events & callbacks are fired in a row (START/  
UPDATE/ END).


That said, I'm not saying it couldn't be a LinearGo issue of course!

To test, first check your onUpdate code in your subclass and be sure  
it is in fact updating for any type passed. Try subscribing a COMPLETE  
event on the failing tweens, and use it to test the tween's "position"  
value which should be 1. If you do get that event and value is 1, then  
things should be okay, but also try putting a trace at the top of  
onUpdate to see if it fires properly...

Let me know if that solves it...?

-moses


On Apr 1, 2008, at 2:38 AM, Jan m. Danielsson wrote:

> Hi there Moses!
>
> First of all - awesome job on Go! I love this tweening system.
>
> Now to the problem - bob wrote about his problems when making a xml  
> parser
> including Go. I have a similar (I think) problem. This is NOT only  
> related
> to the new version with the repeater in linearGo. I had the issue  
> with the
> former version of linearGo, and I have the issue when using the latest
> build of the branch.
>
> I´m making a gallery where thumbnails is placed in a rectangular grid.
> When you roll over a thumbnail wiith the mouse, the picture "comes  
> closer"
> to the viewer, and then moves back in place when mouse rolles out.  
> This is
> done using linearGo for tweening the movement, and using  
> Papervision3D for
> the movement itself.
> There are also "category buttons" which, when rolled over, moves all
> thumbnails in that category closer to the viewer, and then back  
> again when
> mouse rolles out of the button.
> The problem comes when clicking the category buttons. When a category
> button is clicked, all the thumbnails belonging to that category are  
> moved
> to one place and "stacked" in front of each other. This is done using
> linearGo. The function cycles through the thumbnails, and if the  
> thumbnail
> belongs to the clicked category, it is assigned a linearGo which  
> will move
> it to the "stacking place". The linearGo instance will have a delay  
> which
> is increased for every thumbnail, resulting in a successing movement  
> of
> the thumbnails, rather all the thumbnails moving at ones.
> The problem is that if the duration property of the linearGo is too  
> short,
> some thumbnails are "skipped" and not moved by the Go system. When I
> increase the duration to 0.4 this problem disappears.
> The thumbnails that are skipped varies; sometimes no thumbnails are
> skipped, mostly some are skipped, and they are mostly different ones  
> every
> time - seems very random. The skipped thumbs always seem to be the  
> ones in
> the beginning of the cycle though.
>
> Since I solved the problem by increasing the duration, I didn´t  
> bother.
> But when bob wrote of his problem, I was reminded again. So I tried  
> using
> the new version of linearGo, but there´s no difference.
>
> The total number of thumbnails in the gallery that are cycled  
> thorugh are
> 90. The number in a clicked category varies between 40 and 80.
>
> As I said, the same number of thumbs are also moved when a category  
> button
> is rolled over, but then no thumbs are ever skipped. The difference is
> that no delay is used. I tried to use a dealy on the roll over  
> function,
> but no tweens were skipped even if I used the same delay and  
> duration as
> when clicked. I use the same kind of eventlistener in both cases, so  
> it
> seems quite strange. Hope this can give some clue to what (if  
> anything) is
> failing. I am aware that it could be my implementation that is  
> faulty, but
> since everything works fine when using longer durations, i don´t  
> know ....
>
> And remember, I´m still totally impressed with this system. Go!
>
> ///JmD
>
> _______________________________________________
> 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/20080401/f51ce6b5/attachment.html 


More information about the GoList mailing list