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

Animation Queue Troubles

Expand Messages
  • itsallaboutyui
    Unfortunately there are no examples of an animation queue. I assumed it was so simple as to start both animations calling animate();, but it doesn t work like
    Message 1 of 3 , Sep 22, 2006
    • 0 Attachment
      Unfortunately there are no examples of an animation queue. I assumed
      it was so simple as to start both animations calling animate();, but
      it doesn't work like that for me.

      I'll illustrate with my example (which is bad code) - and also leaks
      memory. While I've read that memory leaks are often caused by event
      stuff, I've no idea what is happening.

      The idea is to fade the image out (opacity to 0, change the source,
      and fade the new image back in. Every 4 seconds more memory leaks.
      This is the only way I could get it to queue but I'm sure its not what
      Im meant to do !

      function slideshow(){

      animOut.onComplete.subscribe(

      function(){

      if ($('slideshow').src == dN + 'img/slideshow.jpg'){

      $('slideshow').src='img/slideshow2.jpg';

      }else{

      $('slideshow').src='img/slideshow.jpg';}

      animIn.animate();

      window.setTimeout(slideshow, 4000);

      }

      );

      animOut.animate();

      }
    • itsallaboutyui
      Bump! I still haven t figured out animation queues :(
      Message 2 of 3 , Oct 1, 2006
      • 0 Attachment
        Bump!

        I still haven't figured out animation queues :(
      • Jack Slocum
        This is probably overkill, but check out this article . ... Jack
        Message 3 of 3 , Oct 1, 2006
        • 0 Attachment
          This is probably overkill, but check out this article .

          ---
          Jack Slocum
          Yahoo! UI - Beyond the Examples
          http://www.jackslocum.com/yui/

          --- In ydn-javascript@yahoogroups.com, "itsallaboutyui" <dcaunt@...> wrote:
          >
          > Bump!
          >
          > I still haven't figured out animation queues :(
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.