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

  • Home
  • SEARCH
  • 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 230237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:49:57+00:00 2026-05-11T19:49:57+00:00

I am in the process of creating a new – lite – version of

  • 0

I am in the process of creating a new – “lite” – version of a Flex application I created a while ago. I have been porting over many of the Classes and Components to a Flex Library Project that compiles an SWC file. Because both are Cairngorm applications, I’m not able to completely eradicate duplicate code, but it seems logical that I should be able to share assets – such as icons (PNG files). What is the best way to do this? I have tried including them in the SWC, but I can’t figure out how to access them in the application. If you can help me figure that out, then my question will be answered. Any thoughts?

Here is and example of how I currently embed icons/images in my Flex application:

<mx:Script>
    <![CDATA[
        [Bindable]
        [Embed(source="assets/icons/cancelIcon.png")]
        private var cancelIcon:Class;

        [Bindable]
        [Embed(source="assets/icons/saveIcon.png")]
        private var saveIcon:Class;
    ]]>
</mx:Script>

Thanks.

  • 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-11T19:49:57+00:00Added an answer on May 11, 2026 at 7:49 pm

    0) First, looking at the code above – I recommend some minor changes:

    // Actionscript instead of MXML:
    public class ResourceClasses
    {
            Bindable]
            [Embed(source="assets/icons/cancelIcon.png")]
            public static var CancelIconClass:Class;
    
            // make your variable public and static without public no one 
            // outside the class can access AND bindable won't matter
    }
    

    —- Now, compile your library.
    —- If the assets aren’t in the right place the compiler will complain

    1) In your application, you need to reference the library project / swc

    —- You should be able to get code hints / intellisense in Flex Builder / eclipse from classes in your Application to classes in the library project

    2) In your Application – Do some code like this:

    var image:Image = new Image();
    image.source = ResourceClasses.CancelIconClass;
    
    // more image property setting... 
    
    someCanvas.addChild(image);
    

    3) This will get you going – using a Library project to hold images, etc…

    *** DO NOTE: If the images need to be loaded multiple times, reused, etc — There are other steps to take to squeeze out the best performance, etc…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 256k
  • Answers 256k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Oh I see Jeff reported that the current UI version… May 13, 2026 at 10:29 am
  • Editorial Team
    Editorial Team added an answer You can use the command-line "sox" tool or the Audacity… May 13, 2026 at 10:29 am
  • Editorial Team
    Editorial Team added an answer Two things: I don't think you actually used gcc -m64… May 13, 2026 at 10:29 am

Related Questions

I am in the process of creating a new - lite - version of
I am in the process of creating a new team project by executing the
I am in the process of teaching myself thread based programming techniques and this
OK, I am not sure if the title it completely accurate, open to suggestions!
I am in the process of configuring a new test server for an application

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.