1 Reply Latest reply on Jan 14, 2010 12:46 PM by lkenney2

    AS: Accessing Components inside Components

    lkenney2

      I'd like to apply an action to a UI Component. This UI Component is in a TabNavigator. Using actionScript, how can I communicate to that UI Component?

       

      The progression looks like this:

       

      TabNavigator > NavigatorContent > Border > Group > UI Component

       

      Thanks!

        • 1. Re: AS: Accessing Components inside Components
          lkenney2 Level 1

          Solved my own problem!

           

          <mx:TabNavigator x="10" y="10" width="980" height="748" id="playerTabNav" creationPolicy="all">
          

           

          The children of a TabNavigator aren't created until they're needed.Only the contents of the first tab are actually created, because they're part of what's needed when the TabNavigator is first displayed. The contents of the second tab won't be instantiated until they need to be displayed, which is when the second tab is clicked on.

          To force the contents of the other tabs to be instantiated, the creationPolicy property of the TabNavigator is changed to be "all". This will cause all of the different tabs to be instantiated, regardless of having been clicked on.