This question is really part of a larger ball of stuff I'm trying to
untangle.  Basically, the first part is that if I have this:

[Embed(source="logo.png")] public var logo:Class;
...
var img:Image = new Image;
img.source = logo;

Is there any way to get a ByteArray from img that can be fed to Loader?
Unfortunately, I'm stuck with Loader.  If you really want to know, I'm
trying to mess with a TextArea that has htmlText with an <img> tag in it.  I
want to switch the img tag to switch between different images that are
embedded in the SWF. As far as I can tell, there's no way to tell an <img>
tag to load an image out of the SWF.  Feel free to correct me on that.
Because of some features of the environment, I really want to embed the
images and not load them from the local file system or over the network.

Eventually, I actually want to replace the PNG with an SVG.  This is part of
why I'm wanting to have the files embedded.  But I know this will bring
further challenges, as SVG is a vector format and I will have to get a
raster rendering of the SVG at a certain size before I can ever expect to
feed it to Loader.  But I'm trying to take it one giant hurdle at a time.

Any thoughts, other than that I'm insane to do such a thing?

-- 
Jason

Reply via email to