title: How can I add effects to the show/hide of a spark control?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4567172/flex-4-group-showeffect-hideeffect">Flex 4 Group showEffect/hideEffect</a>  </p>
  </blockquote>
  
  
  
  <p>I have an existing flex application that uses databinding to show/hide certain elements. It looks a little like this:</p>
  
  <pre><code>&lt;namespace:CustomComponent visible="{modelObject.showCustomComponent}" /&gt;
  </code></pre>
  
  <p>To spruce it up a little bit, I went in and did this:</p>
  
  <pre><code>&lt;s:Move id="ccRollIn" target="{cc}" xFrom="-400" xTo="50" /&gt;
  ...
  &lt;namespace:CustomComponent id="cc" visible="{modelObject.showCustomComponent}" show="ccRollIn.play()" hide="ccRollIn.play(null, true)" /&gt;
  </code></pre>
  
  <p>The problem with this is that while the show event plays perfectly, the item disappears from view before the hide effect has a chance to play. Is there a simple way to handle adding animations to this workflow?</p>