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 5984085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:19:26+00:00 2026-05-22T22:19:26+00:00

When you embed media in FLash Builder like below it creates a class to

  • 0

When you embed media in FLash Builder like below it creates a class to reference

[Embed(source="images/list.png")]
protected static const LIST_ICON:Class;

What kind of class does that create? And if I had a library swc that contained bitmapData, how would I go about in code creating the same kind of class using a bitmapData from my swc?

I have a SWC with with bitmapData

I have an xml file that comes in my file that defines what bitmap I am using

so I then get the class by doing

var ClassReference:Class = getDefinitionByName("ImageData") as Class;

“ImageData” is example for any text that the xml sends in… so it dynamically decides what swc class to fetch.

Afterwards I need to use this to create a Class that I guess that extends BitmapAsset containing the fetched bitmapData… thus emulating the embed from the first two lines above.

The end result is that I have a system that calls

getQualifiedClassName(SomeClass)

The class this is being passed to then uses

getDefinitionByName("passedName") 

to get the Class and thus the containing bitmapData.

Its a bit tricky but I have to do it that way to keep it dynamic on my end… can’t modify the code that is handling the data passed to it. It has to be passed by name

I was hoping it would be simpler, but I am starting to think it would be easier to embed all of this in the normal way and make a simple switch that uses a different embed depending on what the XML says

  • 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-22T22:19:27+00:00Added an answer on May 22, 2026 at 10:19 pm

    If you check out the documentation (http://livedocs.adobe.com/flex/3/html/help.html?content=embed_4.html) on the Embed metadata it shows that the image will be embedded with the type mx.core.BitmapAsset (that is, your LIST_ICON class extends BitmapAsset).

    Adjusted for your embed, the code would be:

    [Embed(source="images/list.png")]
    protected static const LIST_ICON:Class;
    
    ...
    
    var imgObj:BitmapAsset = new LIST_ICON() as BitmapAsset;
    

    Check out the link above for the full code example.

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

Sidebar

Related Questions

I would like to embed Flash Player directly inside a C++ or Java application.
I'm using jQuery-media module to embed my flash player. How can I pass the
i'm trying to embed a swf to my as3 flex project like this: [Embed(source
I have a code as below import flash.media.Sound; import flash.media.SoundChannel; flash.system.Security.allowDomain(*); var request:URLRequest =
I would like to embed a css file using [Embed(source = 'mystyle.css', mimeType =
I am trying to currently embed a media player into certain web content and
I have created a FLV video player using the AS3 flash.media.Video object (not the
I am trying to embed a flash video into a custom setup of the
I was wondering if there is someway to embed a Flash Shockwave Object or
We embed some flash stuff onto our site (YouTube videos + an audio player),

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.