I have a class for all my assets:
package view.assets
{
public class ImageAssets
{
[Embed(source="./assets/edit.png")]
public static var iconEdit:Class;
}
}
Then I try to use that image asset within a MenuBar menuitem:
<mx:Script>
<![CDATA[
import view.assets.ImageAssets;
public var iconEdit:Class = ImageAssets.iconEdit;
]]>
</mx:Script>
<mx:XMLList id="menuXML">
<!-- Proyectos -->
<menuitem label="Proyectos" >
<menuitem label="Listado" data=""/>
<menuitem label="Crear" data=""/>
<menuitem label="Editar" data="" icon="iconEdit"/>
</menuitem>
</mx:XMLList>
<mx:MenuBar id="menuBar" labelField="@label" iconField="@icon" dataProvider="{menuXML}" />
Also I must admint that I have tried all possible combinations with static and const...
Any light on this will be appreciated.
Cheers!
Joan
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

