I had been using the link type chain. I actually was just able to get
it to work too properly by using the onChainComplete event for Morph,
which, if any needs to figure out the syntax for that, it looks like
this:
var animated = new Fx.Morph(this.animatedEl, {
duration: this.options.duration,
transition: this.options.transition,
link:'chain',
onChainComplete: function(){
this.completed();
}.bind(this)
});
On Oct 1, 2:27 pm, "Nathan White" <[EMAIL PROTECTED]> wrote:
> I'm curious are you using link type of 'chain' in your morph options?
>
> you could do this:
>
> animate.addEvent('completeChain', endFunction);
> // if not link = chain
> animate.addEvent('complete', endFunction);
> xValues.each(function(item, index){
> animated.start({
> 'top': yValues[index],
> 'left': item
> });
>
> });
>
> On Wed, Oct 1, 2008 at 4:49 PM, VirtuosiMedia <[EMAIL PROTECTED]>wrote:
>
>
>
> > I'm having a little trouble with executing a function at the proper
> > time once the animations in an each loop have completed. Rather than
> > running after all animation is done, it instead runs instantly after
> > the calculations are done. I know that this is a common thing to do,
> > but I'm struggling with it for some reason. Here's the relevant code
> > using (the animations use Morph):
>
> > xValues.each(function(item, index){
> > animated.start({
> > 'top': yValues[index],
> > 'left': item
> > });
> > });
> > //I would like to run this function after the above animations have
> > finished
> > this.completed();