Skip navigation
Currently Being Moderated

Need an event that fires for child containers on tabnavigator change

Oct 22, 2007 6:15 PM

I have a tabnavigator with canvas containers representing pages in a web app. What event can I attach to each canvas container's implementation actionscript file that will fire whenever that canvas comes into view via the tab selection? (sort of like an onload event). This event is used to refresh data for that particular page, so I need it to fetch data whenever the page (tab) is selected.

I do not want to attach any events to the tabnavigator itself so that the implementation is generic at the container level. I tried several events, such as show and creationComplete, but the creationComplete event only fires the first time when the canvas is instantiated.

Maybe this is really easy and I am just missing it somehow...
  • Currently Being Moderated
    Oct 22, 2007 10:49 PM   in reply to BIOSMonkey
    show should be called on the canvas each time that tab for the canvas is selected. so should the updateComplete.

    have you tried that?

    Mark as:
  • Currently Being Moderated
    Oct 23, 2007 8:12 AM   in reply to BIOSMonkey

    private function onTabChanged(event:IndexChangedEvent):void
    case 0:
    // Do someting for the first tab
    case 1:
    // Do someting for the second tab
    case 2:
    // Do someting for the third tab
    // And so on and so forth...


    <mx:TabNavigator id="tabNavigatorMain"
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points