Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

Flash List Component ActionScript 3 Tutorial

This Flash Component tutorial series show how to use List with Flash ActionScript 3.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

The Flash List component displays list-based information and is ideally suited for the display of arrays of information.

The finished Flash Movie of this tutorial is shown as above. Click on the above Flash Movie and play around.

Flash ActionScript Codes:

//Uncomment the following line if create runtime List Box
//import fl.controls.List;
import fl.events.ListEvent

//Add Items to List
fruitList.addItem( {label: "Apple"} );
fruitList.addItem( {label: "Orange"} );
fruitList.addItem( {label: "Papaya"} );
fruitList.addItem( {label: "Banana"} );
fruitList.addItem( {label: "Water Melon"} );

//Add ITEM_ROLL_OVER event listener to List
//Whenever the mouse Roll Over a Label, function showItemLabel will be called
fruitList.addEventListener(ListEvent.ITEM_ROLL_OVER, showItemLabel);


function showItemLabel(event:ListEvent):void {

//Display message on "Label of List" TextField
fruitListLabel_txt.text = "Do you like " + event.item.label + " ?";

//Empty message on "Message Box" TextField
output_txt.text = "";



//Add ITEM_ROLL_OVER event listener to List
//Whenever a Label is selected, function selectItemLabel will be called
fruitList.addEventListener(ListEvent.ITEM_CLICK, selectItemLabel);


function selectItemLabel(event:ListEvent):void {

//Display message on "Label of List" TextField
fruitListLabel_txt.text = "You selected " + event.item.label;

if (event.item.label == "Orange") {
//Display message on "Message Box" TextField
output_txt.text = "Yeah.... " + event.item.label + " is my favorite fruit!";


Download Flash Source File:

Flash Source File list.fla


This Flash ActionScript tutorial shows how to use Flash List component.