2 Replies Latest reply on Apr 1, 2011 1:08 AM by Kalle Werning

    resizing Panel with tabnavigator inside works only at 2nd run

    Kalle Werning Level 1

      I have a strange behaviour. IF putting an navigator into a panel, and trying o resize this,

      It will work always only when its revoked again. Also addaction and removeaction doesnt seem to work.

      Any Ideas?



      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     minWidth="955" minHeight="600"
                     width="100%" height="100%"


                  import flash.utils.Timer;
                  import flash.events.TimerEvent;
                  import flash.events.Event;


                  private var timer:Timer;
                  private function init():void {
                      timer = new Timer(5000);
                      timer.addEventListener(TimerEvent.TIMER, switcher);


                  public function switcher(event:TimerEvent):void {
                      if (currentState =="State1") {
                          currentState = "State2";
                      } else  {
                          currentState = "State1";
              <s:State name="State1"/>
              <s:State name="State2"/>
              <s:Transition fromState="State1" toState="State2">
                  <s:Resize target="{mainPanel}" />
              <s:Transition fromState="State2" toState="State1">
                  <s:Resize target="{mainPanel}" />


          <s:Panel id="mainPanel"
                  horizontalCenter="0" verticalCenter="0"
                   width.State1="250"  height.State1="200"
                   width.State2="98%"  height.State2="95%"
              <mx:TabNavigator includeIn="State2" left="20" right="20" top="20" bottom="50">
                  <s:NavigatorContent label="Registerkarte 1" width="100%" height="100%">