In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2010-4-14

Get Adobe Flash player
by kihon 13 Apr 2010
/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/lPez
 */

package
{
	import flash.display.Sprite;
	import flash.events.Event;
	import com.bit101.components.ComboBox;
 
	public class Main extends Sprite
	{
		public function Main()
		{
			var box:ComboBox = new ComboBox(this, 0, 0, "Choose an item");
			box.addItem("FLASH");
			box.addItem("AS3");
			box.addItem("String");
			box.addItem("Number");
 
			box.addEventListener(Event.SELECT, onSelect);
		}
 
		private function onSelect(event:Event):void
		{
			var box:ComboBox = event.currentTarget as ComboBox;
			trace(box.selectedIndex);
			trace(box.selectedItem);
		}
	}
}