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

Re: multiple effects

Expand Messages
  • randomjuju
    Hi there -- I think you ll need to create a separate animation for each effect. Furthermore, you ll need to hook into the onComplete event for the first
    Message 1 of 4 , Mar 2, 2007
    • 0 Attachment
      Hi there -- I think you'll need to create a separate animation for
      each effect. Furthermore, you'll need to hook into the onComplete
      event for the first animation if you want to start new animations once
      it's finished.

      Does that help?

      -Jon

      --- In ydn-javascript@yahoogroups.com, Petre Trinculescu
      <petre.trinculescu@...> wrote:
      >
      > Hello,
      >
      > I am newbie to YUI and I am trying to create multiple effects for
      the same element.
      > My functions reads:
      >
      > function animate() {
      > var myAnim = new YAHOO.util.Anim('test');
      > myAnim.attributes.width = {to: 400};
      > myAnim.method = YAHOO.util.Easing.easeOut;
      > myAnim.animate();
      > myAnim.attributes.width = {from: 400, to: 10};
      > myAnim.method = YAHOO.util.Easing.easeIn;
      > myAnim.animate();
      > }
      >
      > The problem is that only the first effect works. Any hint would be
      appreciated.
      >
      > Regards,
      > Andi
      >
    • asundlihardig
      ... Hi I would like to do the same thing, but I would like the effects to run at the same time. I.E fade and move Alex
      Message 2 of 4 , Mar 2, 2007
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "randomjuju" <jon.chambers@...> wrote:
        >
        > Hi there -- I think you'll need to create a separate animation for
        > each effect. Furthermore, you'll need to hook into the onComplete
        > event for the first animation if you want to start new animations once
        > it's finished.
        >
        > Does that help?
        >
        > -Jon
        >
        > --- In ydn-javascript@yahoogroups.com, Petre Trinculescu
        > <petre.trinculescu@> wrote:
        > >
        > > Hello,
        > >
        > > I am newbie to YUI and I am trying to create multiple effects for
        > the same element.
        > > My functions reads:
        > >
        > > function animate() {
        > > var myAnim = new YAHOO.util.Anim('test');
        > > myAnim.attributes.width = {to: 400};
        > > myAnim.method = YAHOO.util.Easing.easeOut;
        > > myAnim.animate();
        > > myAnim.attributes.width = {from: 400, to: 10};
        > > myAnim.method = YAHOO.util.Easing.easeIn;
        > > myAnim.animate();
        > > }
        > >
        > > The problem is that only the first effect works. Any hint would be
        > appreciated.
        > >
        > > Regards,
        > > Andi
        > >
        >

        Hi

        I would like to do the same thing, but I would like the effects to run at the same time.

        I.E fade and move

        Alex
      • dav.glass@yahoo.com
        Petre -- Here are a couple of useful animation examples: http://blog.davglass.com/files/yui/animseq/ http://blog.davglass.com/files/yui/animagain/ Hope they
        Message 3 of 4 , Mar 2, 2007
        • 0 Attachment
          Petre --

          Here are a couple of useful animation examples:

          http://blog.davglass.com/files/yui/animseq/
          http://blog.davglass.com/files/yui/animagain/

          Hope they help 8-)

          Dav
           
          Dav Glass
          dav.glass@...
          blog.davglass.com


          + Windows: n. - The most successful computer virus, ever. +
          + A computer without a Microsoft operating system is like a dog
          without bricks tied to its head +
          + A Microsoft Certified Systems Engineer is to computing what a
          McDonalds Certified Food Specialist is to fine cuisine +


          ----- Original Message ----
          From: Petre Trinculescu <petre.trinculescu@...>
          To: ydn-javascript@yahoogroups.com
          Sent: Friday, March 2, 2007 5:10:41 AM
          Subject: [ydn-javascript] multiple effects

          Hello,

          I am newbie to YUI and I am trying to create multiple effects for the same element.
          My functions reads:

                function animate() {
                    var myAnim = new YAHOO.util.Anim('test');
                    myAnim.attributes.width = {to: 400};
                    myAnim.method = YAHOO.util.Easing.easeOut;
                    myAnim.animate();
                    myAnim.attributes.width = {from: 400, to: 10};
                    myAnim.method = YAHOO.util.Easing.easeIn;
                    myAnim.animate();
                }

          The problem is that only the first effect works. Any hint would be appreciated.

          Regards,
          Andi

        Your message has been successfully submitted and would be delivered to recipients shortly.