List Control Displays a Horizontal List of Items

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”; backgroundColor=”#FFFFFF” backgroundAlpha=”0″
horizontalAlign=”left” verticalGap=”15″ horizontalGap=”15″>

import mx.collections.ArrayCollection;
private var employeeList:ArrayCollection = new ArrayCollection();
private function requestEmployees():void
private function resultHandler(event:ResultEvent):void
employeeList = event.result.employees.employee as ArrayCollection;

//show text message when user selects image
private function showMessage(event:Event):void
message.text = “You selected: ” + event.currentTarget.selectedItem.firstName + ‘ ‘ +

<mx:HTTPService id=”employeesService” url=”;
<mx:Button label=”Return Employees” click=”requestEmployees()” />
<mx:HorizontalList id=”mylist” labelField=”firstName” dataProvider=”{employeeList}” columnWidth=”100″
rowHeight=”50″ columnCount=”5″ itemClick=”showMessage(event)”/>
<mx:Text id=”message” paddingTop=”20″ />


~ by mjcprasad2000 on January 30, 2009.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: