0 Replies Latest reply on May 17, 2011 2:12 PM by pk. Rzhevskij

    TabNavigator: making blinking tabs problem

    pk. Rzhevskij

      Hi guys.

      I have a Messanger application, in wich, when new message comes in, new tab for partcular sender is created (or selectd if exists) and blinking until user clicks on it. If user did not click on the blinking tab, and then, another message from another user  came in - another tab is created or selected and blinking. But the first blinking tab, when focus lost, stops blinking.  I need all the unread tabs blinking untill user clicks on them.


      I have my own "MessageTab" MXML component, which is actually VBox. When new message comes in, new MessageTab is created  and added to the TabNavigator (or if this tab has already exists it is just selected). Every MessageTab has the following code to make tab blinking:



      public var timer:Timer = null;

      private var bIsWhitePanel:Boolean = false;


      public function startBlinking():void {

           this.timer = new Timer(500,0);

           this.timer.addEventListener("timer", slideShowTimerHandler);





      public function slideShowTimerHandler(event:TimerEvent):void {

           var messageTabNavigator:MessageTabNavigator = this.parent as MessageTabNavigator;

            if(bIsWhitePanel) {

                var tab:Button = messageTabNavigator.getTabAt(messageTabNavigator.selectedIndex);


                 bIsWhitePanel = false;


            else {

                 var tab:Button = messageTabNavigator.getTabAt(messageTabNavigator.selectedIndex);


                  bIsWhitePanel = true;