LinkBar With Array Data : LinkBar « Components « Flex






LinkBar With Array Data

LinkBar With Array Data
        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  <mx:Script>
    
      import flash.net.navigateToURL;
      import mx.controls.Alert;
      import mx.events.ItemClickEvent;
      private function clickHandler(event:ItemClickEvent):void
      {
        var request:URLRequest=new URLRequest(event.item.url);
        navigateToURL(request); 
      }
  
  </mx:Script>
  
  <mx:LinkBar itemClick="clickHandler(event)">
    <mx:dataProvider>
      <mx:Object>
        <mx:label>Adobe</mx:label>
        <mx:url>http://www.adobe.com</mx:url>
      </mx:Object>
      <mx:Object>
        <mx:label>Google</mx:label>
        <mx:url>http://www.google.com</mx:url>
      </mx:Object>
      <mx:Object>
        <mx:label>Microsoft</mx:label>
        <mx:url>http://www.microsoft.com</mx:url>
      </mx:Object>
    </mx:dataProvider>
  </mx:LinkBar>
  
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.LinkBar EffectsLinkBar Effects
2.Use LinkBar to create a set of linksUse LinkBar to create a set of links
3.LinkBar controlLinkBar control
4.LinkBar with solid border styleLinkBar with solid border style
5.LinkBar with border styleLinkBar with border style
6.LinkBar item click eventLinkBar item click event
7.Bind data to the tag to populate the LinkBar controlBind data to the <mx:dataProvider> tag to populate the LinkBar control