views:

10

answers:

1

Each block of animations, grouped in an Effect.Parallel, runs simultaneously. That works fine.

Then, I want each of the Effect.Parallels to trigger sequentially, with a delay. The second block doesn't wait its turn. It fires when the function is run. Why?!

      ///// FIRST BLOCK /////
      new Effect.Parallel([      
        new Effect.Morph...
      ], { queue: 'front' });

      ///// SECOND BLOCK /////
      new Effect.Parallel([
        Element.toggleClassName($$('#add_comment_button .glyph').first(), 'yay')
      ], { sync: true, queue: 'end', delay: 1 });

      ///// THIRD BLOCK /////
      new Effect.Parallel([
        new Effect.SlideUp...
      ], { queue: 'end', delay: 4 });
A: 

Did you try dropping the Effect.Parallel and just defining option {queue:'end'} on each effect? You might also want to remove sync option from 2nd block

plodder