My Blog

Just another WordPress.com weblog

PopUp Menu Button

Posted by jacinthasekar on June 17, 2009

<?xml version=”1.0″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Script>
public function showMsg(msg:String):void
{
mx.controls.Alert.show(‘You just clicked on ‘ + msg);
}
</mx:Script>
<mx:Panel width=”100″ height=”100″>
<mx:PopUpMenuButton id=”menuBtn”
dataProvider=”{['One','Two','Three']}”
click=”showMsg(‘left side’)”
itemClick=”showMsg(‘right side with ‘ + event.label)”/>
</mx:Panel>
</mx:Application>

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>