Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3757598
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:01:54+00:00 2026-05-19T10:01:54+00:00

I am trying to create a popupmenubutton, with images and label as its nodes.

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:01:55+00:00Added an answer on May 19, 2026 at 10:01 am

    I normally create a class for each Icon i need

    [Embed("img/Print.png")]
    public const printIcon : Class;
    

    and than use this class as icon

             <mx:XMLList>
                <menuitem label="File">
                    <menuitem label="Print" icon="printIcon"/>
                    <menuitem label="Logout" icon="logoutIcon" />
                    <menuitem label="Close" icon="closeIcon"/>
                </menuitem>
                <menuitem label="Modify">
                    <menuitem label="Preferences" icon="toolIcon" />
                </menuitem>
                <menuitem label="Help">
                    <menuitem label="About Us" icon="infoIcon"/>
                </menuitem>
            </mx:XMLList>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying create alert dailog using glade,but its not working .am i doing
Trying to create a black line in my view to separate text blocks but
Trying to create a new Dedicated Cache Role in Windows Azure but get the
Trying to create a background-image slideshow and am getting this error... This is the
I'm trying create a RCP Application with Eclipse, but I can't get past the
I'm trying create a new file with a Java Applet, but I don't know
I am new to asp.net & trying create a object, but there is a
In my android application I am trying create persistent connection for downloading images. Here
I'm trying create a connection using Spring 3.2.0 but I get NullPointerException of: ApplicationContext
I am trying create a node in ejabber using XMPP and BOSH Manager. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.