4 Replies Latest reply on Dec 29, 2009 1:54 PM by PanicT

    Easer not working for GlowFilter/AnimateFilter?


      For a reason unknown to myself, the easing in the following example does not seem to work:


      <s:GlowFilter id="glowIn"
      <s:GlowFilter id="glowOut"
      <s:Sine id="sineEase"/>


      <s:Sequence id="glow" repeatCount="0" repeatDelay="500" target="newMsgIcon">
                  <s:AnimateFilter id="glowingIn"
                                   easer="{sineEase}" />
                  <s:AnimateFilter id="glowingOut"
                                   easer="{sineEase}" />



      (In action script coding to activate the pulsing glow)


      glow.startDelay = 500;


      The delay is to prevent other animations and messages from not drawing because of this animation.


      The desired effect is to have a pulsing glow of any color that catches the attention of the user but not annoying. If anyone has any suggestions to get my desired effect please give me a reply to this post. The object that the glow is being placed upon is currently an <s:Image /> object, however if needed that can change. The source file is a PNG.



        • 1. Re: Easer not working for GlowFilter/AnimateFilter?
          PanicT Level 1

          A second thought after some testing is that it has to do with the Sequence not allowing the Filters to ease. I had the AnimateFilter objects outside of the Sequence object and they seemed to ease just fine. When I put them into the Sequence object, the easing stopped working.

          • 2. Re: Easer not working for GlowFilter/AnimateFilter?
            Chet Haase Level 3



            I'm not sure what the easing problem is, but there's no need to use a Sequence for this effect - the new repeatBehavior property on Animate subclasses let's you specify that you want a reversing animation (repeatBehavior="reverse"), which will give you the same result as a Sequence with reverse animations inside of it (with a lot less code).



            1 person found this helpful
            • 3. Re: Easer not working for GlowFilter/AnimateFilter?
              Chet Haase Level 3

              For the easing problem you're having, I'm not sure what you're trying to do. For one thing, there is a Sine easer on all effects by default, so you shouldn't see any different with your easer than you would by default.


              Also, you can assign a startDelay directly to the Sequence in the MXML tag instead of in AS code (not sure if there was some reason you were doing this separately). And, as I said before, there's no need for the Sequence tag at all. You should be able to do what you're trying to do with this:

                   <s:AnimateFilter id="glow"

                                    duration="800" startDelay="500"

                                    repeatDelay="500" repeatCount="0" repeatBehavior="reverse"


              and in AS code:




              (note that the stop() call is only necessary if you might be starting an already-playing animation; I assume that's why this is here. You wouldn't need to stop it the first time, but it doesn't hurt if this is general code meant either to start or restart an already-playing animation).



              1 person found this helpful
              • 4. Re: Easer not working for GlowFilter/AnimateFilter?
                PanicT Level 1

                I found the <s:Glow /> object to work perfectly for me.