2 Replies Latest reply on Dec 22, 2011 4:56 AM by CRon_007

    Animate on a text is playing infinitely. How do i stop it?

    CRon_007

      Hi All,

      I'm using s:Animate to blink a text in Flex. But i want it to stop after a few seconds. I have set the duration to '500'. But it seems to be blinking infinitely. How do i stop it?

        • 1. Re: Animate on a text is playing infinitely. How do i stop it?
          CRon_007 Level 1

          This is my animate code:

           

          <s:Animate id="fader"

                             duration="500"

                             repeatBehavior="reverse"

                             repeatCount="0"

                             target="{newIndicator}">

                      <s:SimpleMotionPath property="alpha"

                                          valueFrom="1.0" valueTo="0.0" />

                  </s:Animate>

           

           

          And in the creationComplete event i call :

           

          fader.play().

           

           

          How do i stop it?

          • 2. Re: Animate on a text is playing infinitely. How do i stop it?
            CRon_007 Level 1

            Found the Answer. If the repeat count is set to '"0", then the effect will play indefinitely. So we need to set the repeat count to an integer value which describes the amt of time the effect is to be played. For instance, in the above example, the duration is set to 500 ms. So if i set the repeat count to 1, then the effect will be played once.