0 Replies Latest reply on Aug 26, 2007 6:45 PM by James Bower

    Displaying/Hiding a Tab

    James Bower
      I realize this may be a cross post (sorry) however I suspect that the solution requires an actionscript function.

      I have a tabnavigator with 11 tabs. The last three tabs I would like to make their appearance conditional based on whether they receive a piece of content (a company name) or not. The ideal solution I'm looking for would be if Tab 8 has no company name then hide tabs 8, 9, and 10. If tab 8 has a company name and tab 9 doesn't then hide only tab 9 and 10. And finally if tabs 8 and 9 each have a company name and tab 10 doesn't then just hide tab 10.

      I've tried the following test example on tab 10 without success (yet it works on any children within the tab just not on the tab itself):

      private function tabHideShowHandler():void
      if (T10CompanyName.text.length == 0) // if there isn't a company name
      tab_Id10.visible=false; // then hide the tab

      Any help towarda solution would be greatly appreciated, :)