When you insert media into the FLASH Builder as shown below, it creates a class for the link
[Embed(source="images/list.png")]
protected static const LIST_ICON:Class;
Which class creates this class? And if I had a swc library containing bitmapData, how would I work in code by creating the same class using bitmapData from my swc?
I have a SWC with bitmapData p>
I have an xml file that goes into my file that determines which raster image I use
so I get the class by doing
var ClassReference:Class = getDefinitionByName("ImageData") as Class;
"ImageData" is an example for any text that xml sends ... so it dynamically decides what to select the swc class.
Subsequently, I need to use this to create a class that I think extends BitmapAsset containing the extracted bitmapDates ... in this way, emulating the attachment from the first two lines above.
The end result is that I have a system that calls
getQualifiedClassName(SomeClass)
The class that is passed next uses
getDefinitionByName("passedName")
to get a class and therefore containing bitmapData.
It is a bit complicated, but I have to do it in such a way that it is dynamic at my end ... I cannot change the code that processes the data passed to it. It must be given by name
I was hoping this would be easier, but I'm starting to think that it would be easier to implement all of this in the usual way and make a simple switch that uses different attachments, depending on what the XML says