1 Reply Latest reply on Jul 18, 2010 4:19 AM by FM_Flame

    Flex 4 Fade effect reverse filter suspend ?

    FM_Flame Level 1

      Strigh to the point:

       

      I have a button which plays fade effect on a component. The fade effect looks like this:

       

      var fadeOut:Fade = new Fade();

      fadeOut.target = target;

      fadeOut.duration = 5000;

      fadeOut.alphaTo = 0;

      fadeOut.filter =

      "remove";

      fadeOut.captureStartValues();

      removeElement(target);

      fadeOut.play();

       

      Now I have a second button on which I have:

      fadeOut.reverse();

       

      The problem is that I want when the effect is reversed not to removeElement(target), but it still gets removed as soon as the effect ends. I tried on the second button fadeOut.filter = "", but no luck.

       

      So does anyone know how can I delete that filter so my element doesn't get removed when the effect is reversed and goes back to start state?

       

      Thanks !

       

       

        • 1. Re: Flex 4 Fade effect reverse filter suspend ?
          FM_Flame Level 1

          Probably there's a chance I might use this:

           

          mx.core.UIComponent.effectFinished(effectInst:IEffectInstance):void

          Called by the effect instance when it stops playing on the component. You can use this method to restore a modification to the component made by the effectStarted() method when the effect started, or perform some other action when the effect ends.

          But I don't seem to find any documentation on that, no examples no nothing, I don't understand how can i get that IEffectInstance and how am I supposed to restore the modifications to the component made by the effectStarted...

           

          Definitely need some help here...