You want to use the name of the variable that you used to embed the resource.

 

[Embed(“foo.swf”)]

public var symbol1:Class;

 

<menuitem icon=”symbol1”>

 

More here:

http://livedocs.macromedia.com/flex/20beta1/docs/00000791.html

 

I’m not sure how much is working in B1 (e.g., the example code in there is untested)

 

Matt


From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rovira
Sent: Saturday, March 04, 2006 4:09 PM
To: [email protected]
Subject: Re: [flexcoders] How to add Icon to MenuItem?

 

Hi Matt,

If the XML is external and I have the icons embeded in the SWF, How could I reference the icons in the external XML?
I was trying a lot of ways but I couldn't get the icons displayed in the menu items.

Could you say me if that is possible to accomplish or I'm trying something that we can't do it?

Thanks.

On 3/4/06, Matt Chotin < [EMAIL PROTECTED]> wrote:

I believe that the Menu expects any icons to be already loaded, it won't
load icons dynamically.  So what you have is correct only if you've
embedded those images in the SWF.  Actually you'd probably need to
specify the embedded name.

I'm not sure Menu will support loading images on its own...

That's Flex 1.5 at least, is this for 1.5 or 2.0?

Matt

-----Original Message-----
From: [email protected] [mailto: [email protected]] On
Behalf Of flexhtoo
Sent: Friday, March 03, 2006 11:59 PM
To: [email protected]
Subject: [flexcoders] How to add Icon to MenuItem?

I want to konw how to add icon to menuitem, and then How to customize
the MenuCellRenderer?

There are right way or not?
<MainMenu>
      <menuitem label="slick">
          <menuitem label="MenuItem A" >
              <menuitem label="SubMenuItem 1-A" />
               <menuitem label="SubMenuItem 2-A" />
          </menuitem>
          <menuitem label="MenuItem B" />
          <menuitem label="MenuItem C" />
          <menuitem label="MenuItem D" >
              <menuitem label="SubMenuItem 1-D" icon="icon1.png"/>   
              <menuitem label="SubMenuItem 2-D" icon="icon2.png"/>
              <menuitem label="SubMenuItem 3-D" icon="icon3.png"/>   
          </menuitem>
      </menuitem>
</MainMenu>


Please give me a way.






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








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

 

 





--
::| Carlos Rovira
::| http://www.carlosrovira.com


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