..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 Message ----- From: jitendra jain To: flexcoders@yahoogroups.com Sent: 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 Regards, Jitendra Jain ----- Original Message ---- From: bhaq1972 <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Tuesday, 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 on { image1.source = sHello; } tia bod ------------------------------------------------------------------------------ Did you know? You can CHAT without downloading messenger. Click here