This works for me:

    <mx:Script>
        <![CDATA[
            [Embed('item_bullet.png')]
            private var ITEM_BULLET_ICON: Class;
        ]]>
    </mx:Script>

    <mx:Canvas width="100%" height="100%">
        <mx:Tree defaultLeafIcon="ITEM_BULLET_ICON">
           ....
        </mx:Tree>
    </mx:Canvas>

Or you can short-hand it a bit:

        <mx:Tree defaultLeafIcon="@Embed('item_bullet.png')">



On 1/30/06, Brendan Meutzner <[EMAIL PROTECTED]> wrote:
Hi,

When I try to implement a custom icon in a Tree component for Flex
2.0, it gives me a runtime error stating that it can't find the
variable I've defined for the icon class...

Has anyone gotten this to work?  I can post code if need be...

Thanks,

Brendan







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/







--
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




Reply via email to