hi,
i'm not sure if this is what you're looking for, but you can load images 
into <mx:Image> using load(url);

yours,
ed

eg:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
<mx:Script>
<![CDATA[
function setImage(n : Number) : Void
{
if(n == 1)
previewImage.load('image1.jpg');
else if(n == 2)
previewImage.load('image2.jpg');
}
]]>
</mx:Script>
<mx:Image id="previewImage" marginLeft="12" marginRight="12" width="100" 
height="100" />

<mx:Button id="button1" label="setimage 1" click="setImage(1);"/>
<mx:Button id="button2" label="setimage 2" click="setImage(2);"/>

</mx:Application>


Stacy Young wrote:

> I’m creating a component that will require a XML dataprovider in which 
> a number of elements are paths to images. Currently I’m embedding 
> these images statically as follows:
>
> [Embed(source="/assets/images/menu/menu_inbox_off.png")]
>
> var img_0_off :String;
>
> [Embed(source="/assets/images/menu/menu_inbox.png")]
>
> var img_0_on :String;
>
> Now those image urls are dynamic…is there still a way I can embed 
> these images?
>
> Cheers!
>
> Stace
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     * Visit your group "flexcoders
>       <http://groups.yahoo.com/group/flexcoders>" on the web.
>     * To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to