The Combo Box Component

The combo box is a drop down list. In this example, there is a vehicle on each of 3 frames.

Get Adobe Flash player

The code is shown below:

stop();
cboChoice.addEventListener(Event.CHANGE, changeFrame);

function changeFrame(e:Event):void
{
	lblChoice.text=""+cboChoice.selectedItem.label;
	gotoAndStop(cboChoice.selectedItem.data);
}
Download the movie
INDEX, Introduction to Components, ComboBox: Select a Vehicle, ComboBox: Demo, ComboBox: DataBinding in ActionScript, Radio Buttons, Check Boxes, Numeric Stepper
Next lesson: Drawing in ActionScript3

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

ComboBox: Select a Vehicle