I am trying to create a popupmenubutton, with images and label as its nodes. But I am unable to embed the icons. It gives me and error(given below). Thou the label alone are working fine.
<mx:PopUpMenuButton id="menu_file" labelField="@label" itemClick="{menuClickHandler(event);}" visible="false"
height="20" left="0" top="0" width="15" alpha="0.5" cornerRadius="5" useHandCursor="true"
toolTip="Delete, Move, Rename or Modify other properties">
<mx:dataProvider>
<mx:XMLList>
<node label="{LABEL_DELETE}" icon="@Embed(source='assets/FileManager/images/cancel2.png')"/>
<node label="{LABEL_DOWNLOAD}" icon="@Embed(source='assets/FileManager/images/cancel2.png')"/>
<node label="{LABEL_MOVE}" icon="@Embed(source='assets/FileManager/images/cancel2.png')"/>
<node label="{LABEL_RENAME}" icon="@Embed(source='assets/FileManager/images/cancel2.png')"/>
<node label="{LABEL_SET_PRIVACY}" icon="@Embed(source='assets/FileManager/images/cancel2.png')"/>
</mx:XMLList>
</mx:dataProvider>
This gives me an error: Initializer for 'Embed': unrecognized compile-time directive.
Plz can someone tell me what I am doing wrong here.
Thanks Zeeshan