1 Reply Latest reply on Feb 6, 2008 1:37 PM by Gregory Lafrance

    Link to tab Bars


      I just started using Flex for my application. I am working on the front end . I got stuck up with the tab bar. When a user clicks on a button on the tab bar. It should go to the new page. Wondering if any one could help me out.

        • 1. Re: Link to tab Bars
          Gregory Lafrance Level 6
          See this FB 2.0.1 help topic: TabBar control

          <?xml version="1.0"?>
          <!-- controls\bar\TBarEvent.mxml -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">


          import mx.events.ItemClickEvent;
          import mx.controls.TabBar;
          import mx.collections.ArrayCollection;

          private var STATE_ARRAY:ArrayCollection = new ArrayCollection([
          {label:"Alabama", data:"Montgomery"},
          {label:"Alaska", data:"Juneau"},
          {label:"Arkansas", data:"LittleRock"}

          private function clickEvt(event:ItemClickEvent):void {
          // Access target TabBar control.
          var targetComp:TabBar = TabBar(event.currentTarget);
          forClick.text="label is: " + event.label + " index is: " +
          event.index + " capital is: " +

          <mx:TabBar id="myTB" itemClick="clickEvt(event);">

          <mx:TextArea id="forClick" width="150"/>