0
votes

How to change selected index in Tabbar from ChildExistenceChangedEvent.CHILD_ADD event?

This is the Flex 4.6 sdk code:

public function set selectedIndex(value:int):void
{
     // Bail if the index isn't changing.
     if (value == selectedIndex)
          return;
     // ignore, probably coming from tabbar
     if (addingChildren)
          return;
    .
    .
    .
}

So addingChildren is set to true and they ignore me, and they only change it after I finish executing my code.

I been trying to create a custom event and change it from there, but it's not working.

Any ideas?

1

1 Answers

0
votes

Found it, I am listening to UPDATE event and don't have this problem any more