Use PopUpMenuButton change event to set the label
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="600"
width="600">
<mx:Script>
import mx.events.MenuEvent;
public function itemClickHandler(event:MenuEvent):void {
event.currentTarget.label= "Send to: " + event.label;
}
[Bindable]
public var menuData:Array = [
{label: "A", data: "a"},
{label: "B", data: "b"},
{label: "C", data: "c"},
{label: "D", data: "d"},
{label: "E", data: "e"}
];
</mx:Script>
<mx:PopUpMenuButton id="p1"
showRoot="true"
dataProvider="{menuData}"
label="Send to: Inbox"
itemClick="itemClickHandler(event);" />
</mx:Application>
Related examples in the same category