Okay I figured out one of my problems with the usage of the chain but I am
still getting the same problem with it jump to the last point after moving
to the first point.

The problems with using your method is that the number of times the element
movers varies every time it is call, one time it could be 2 points, the next
time it could be 16 points.



On Mon, Jan 31, 2011 at 9:44 AM, Ryan Florence <[email protected]> wrote:

> I haven't worked a lot with Chain, but it doesn't just go hog-wild and run
> every function.  Rather, whenever you callChain, it calls the next function
> and then removes it from the chain.
>
> Instead, you probably just need to utilize the link: 'chain' option for an
> effect:
>
> myFx = new Fx.Morph('el', { link: 'chain'});
> myFx.start(args).start(args).start(args).start(args).start(args);
>
> That will chain the effects.  There's even a chainComplete event for Fx
> when all of them are finished.
>
> On Jan 31, 2011, at 10:32 AM, Trevor Orr wrote:
>
> I am having problems getting the chain to work, what I am trying to do is
> to move an element along a curved line, the line is made of a bunch of
> points. Instead of moving directly from point 1 to say point 6 I want it
> move from point to point along the curve until it reaches the final desired
> point.
>
> I have a function called movePeg which I pass in a number of points to
> move, this function builds an array of functions to call which is passed
> into the a new Chain class, which from my understanding these functions
> should get called once the previous function has completed. The function
> called uses a Fx.Move to move the element from the current position to the
> next position in the curve, thus giving the desired effect, or at least I
> thought it would have.
>
> Any help on what I am missing/doing wrong would be greatly appreciated.
>
> The blue square is supposed to move the one red box to the next, it seems
> to move to the first one and jump to the last one.
>
> Here it is on jsfiddle.
>
> http://jsfiddle.net/u2eLj/
>
>
>
>
>

Reply via email to