5 Replies Latest reply on Feb 27, 2009 3:47 PM by Francisc

    How to apply a resize effect when a state expand a Panel

    Level 7
      Hi, I'm trying to apply an effect when a panel is resized.
      I tried using transition and the resize event, but without result.
      Any advice?

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:State name="MaxA">
      <mx:RemoveChild target="{pnlB}"/>
      <mx:SetProperty target="{pnlA}" name="width" value="100%"/>
      <mx:State name="MaxB">
      <mx:RemoveChild target="{pnlA}"/>
      <mx:SetProperty target="{pnlB}" name="width" value="100%"/>

      <mx:Resize id="myRes" />

      <mx:DividedBox id="divBox" x="85" y="147" height="100%" width="100%"
      direction="horizontal" borderStyle="solid" borderColor="#000000"
      <mx:Panel id="pnlA" width="60%" height="100%" title="Sono A"
      <mx:Panel id="pnlB" width="40%" height="100%" title="Sono B">
      <mx:Button x="85" y="43" label="Expand A" click="currentState='MaxA'"/>
      <mx:Button x="85" y="84" label="Expand B" click="currentState='MaxB'"/>
      <mx:Button x="223" y="43" label="Default" click="currentState = ''"/>