2 Replies Latest reply on Jan 28, 2011 8:39 AM by nross_rain_83

    Spark Resize effect not working when used with resizeEffect style

    nross_rain_83 Level 1

      I'm wanting to use the Spark Resize effect bound to the resizeEffect style property of a Panel component, but it doesn't animate when I resize the container.  If I change it to a MX Resize effect, it works perfectly.  Here's sample short sample code:

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="library://ns.adobe.com/flex/spark"

      xmlns:mx="library://ns.adobe.com/flex/mx">

      <fx:Declarations>

      <s:Resize id="resizer" duration="500" />

      </fx:Declarations>

      <s:Panel id="panel"

      title="title"

      width="320"

      height="240"

      resizeEffect="{resizer}">

      <s:Button label="Grow" click="panel.width+=20; panel.height+=20" />

      </s:Panel>

      </s:WindowedApplication>

       

      This will not animate unless I change s:Resize to mx:Resize.  I assume the spark Resize effect is only intended to be used within Transitions or by using it's play() function programmatically in actionscript because both of those cases work fine.

       

      I would be ok with this, but I can't find anything on google that supports my theory.  Am I going crazy?


      Thanks,

      Nate