You can use a Loader and attempt a load as follows:
/**
* The Loader used to load images.
*/
private var _imageLoader:Loader = new Loader();
...
var urlRequest:URLRequest = new URLRequest(someURLString);
try
{
_imageLoader.loa
8 5:55:50 PM
Subject: Re: [flexcoders] determine if image source exists
..but understand that it's no longer an external asset and will be embedded in
your swf. If the png changes after you publish the swf, the change won't be
picked up until you republish.
- Original Mes
t: Tuesday, September 30, 2008 1:10 PM
Subject: Re: [flexcoders] determine if image source exists
Use Embed keyword that will help embedding the image in a class while
compiling.
[Embed("assets/status.png")]
private var status:Class;
image.source=status;
Thanks,
with Rega
ay, 30 September, 2008 5:35:19 PM
Subject: [flexcoders] determine if image source exists
How can I check if a the jpg source defined by a string really exists.
eg
var image1:Image = new Image();
var sHello:String = "images/hello. jpg";
if(sHello exists) // this is the bit i need help o
How can I check if a the jpg source defined by a string really exists.
eg
var image1:Image = new Image();
var sHello:String = "images/hello.jpg";
if(sHello exists) // this is the bit i need help on
{
image1.source = sHello;
}
tia
bod
5 matches
Mail list logo