Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] How execute Animations in parallel?

Expand Messages
  • Matt Sweeney
    Hi Rene, You should be able to use the onTween() customEvent to handle this. It fires for every animation frame that is executed, and would allow you to do
    Message 1 of 2 , May 30 11:05 AM
    • 0 Attachment
      Hi Rene,

      You should be able to use the onTween() customEvent to handle this. It
      fires for every animation frame that is executed, and would allow you to
      do something like "if sum of widths is greater than 900, round down".

      Matt


      rene.haber wrote:

      >Hello,
      >
      >if I have to Animations like this:
      >
      >var anim_item1 = new YAHOO.util.Anim('item1', {width: {to: 600}}, 1,
      >YAHOO.util.Easing.easeOut);
      >var anim_item2 = new YAHOO.util.Anim('item2', {width: {to: 300}}, 1,
      >YAHOO.util.Easing.easeOut);
      >
      >running with the same duration it would be nice to have a method to
      >synchronize both animations (or an arbitrary number of animations).
      >In my test, item1 starts with a width of 300px and item2 with 600px,
      >when i run both animations at the same time it happens that the total
      >width of both elements is greater than 900px which could break the
      >layout. A method for parallel effects would need to run the animations
      >stepwise. I haven't found something like this in the API docs nor in
      >this group. Could someone give me a hint how to do this or is this
      >even planned for the next release?
      >
      >Thanks.
      >
      >René
      >
      >
      >
      >
      >
      >
      >
      >Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.