The icon field holds the name of the image class, and we have to look it up somewhere to convert it to an actual class and where we look is the MenuBar's document. That's why they must be instance variables of the same MXML file as the MenuBar. Statics won't work and other documents won't work either. You can customize your renderer to get smarter about where it looks.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Danish Tehseen Sent: Tuesday, February 26, 2008 2:47 AM To: [email protected] Subject: [flexcoders] Using embeded icons in MenuBar There is a case where I have to show icons in the MenuBar. I have created a component which extends from HBox and contains a MenuBar. labelField, iconFeild & dataProvider property of the MenuBar are set from the parent page. XMLList which is assigned to the dataProvider property of the MenuBar, contains icon field which holds the name of the image class. - First Issue: Icon is not shown by the MenuBar if the image class object is static. -Second Issue: I am using RSL library project for embeded assets. If I am providing the icon field in the dataProvider as below, icons are not shown in MenuBar. icon="parentClass.assetClass" assetClass is also bindable. Can somebody guide me what I am doing wrong. __________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs <http://www.yahoo.com/r/hs>

