Hard code data provider for PopUpMenuButton
<?xml version='1.0' encoding='UTF-8'?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
public function showMsg(msg:String):void
{
Alert.show('You just clicked on ' + msg);
}
</mx:Script>
<mx:PopUpMenuButton id="menuBtn"
dataProvider="{['One','Two','Three']}"
click="showMsg('left side')"
itemClick="showMsg('right side with ' + event.label)" />
</mx:Application>
Related examples in the same category