1 Reply Latest reply on Dec 22, 2009 10:36 PM by Bertrand G.

    How to animate panel's borderAlpha between states?

    kmdguy

      Hi there,

       

      I have two states where a panel starts small in one state, then grows larger in the next state.

       

      I want to have the borderAlpha property of the panel change between states as well. The first state I want the borderAlpha to be ".04", the other state it needs to be "1".

       

      I've looked around and I can't find a way to define the borderAlpha between the two states.

       

      When I use this code in the state's properties I keep getting an error: ("panelURL" is the id of the panel)

       

      <mx:SetProperty target="{panelURL}" name="borderAlpha" value="1.0"/>

        • 1. Re: How to animate panel's borderAlpha between states?
          Bertrand G.

          Hi, have you taken a look at transitions between states?

           

           

          for example:

           

             <mx:transitions>
                <mx:Transition id="toOver" fromState="*" toState="over">
                   <ds:AnimateColor target="{this}" property="backgroundColor"
                      isStyle="true" toValue="0xff9600" duration="300" />

                </mx:Transition>
                <mx:Transition id="toUp" fromState="*" toState="up">
                   <ds:AnimateColor target="{this}" property="backgroundColor"
                      isStyle="true" toValue="0x1e83b8" duration="300" />

                </mx:Transition>
                <mx:Transition id="toDown" fromState="*" toState="down">
                   <ds:AnimateColor target="{this}" property="backgroundColor"
                      isStyle="true" toValue="0xff9600" duration="300" />

                </mx:Transition>
             </mx:transitions>

           

          (taken from a blog)

           

          hope it helps