I'm creating a media browser, pulling in image links from Google AS API
Sometimes for some reason one of the image urls is invalid, because I get the broken image icon in my Tile container populated by a Repeater.
How can I check to see if the url actually points to a valid image?
Assuming that your HTTPService looks something like this...
<mx:HTTPService id="phpService" url="imageCheck.php" resultFormat="e4x" method="POST">
You can always call a php file to check to see if the image exists. Then you can return the result as XML to Flex.
//Get the image URL from Flex form
$myImage = $_POST['imageURL'];
//Check to see if the image exists by trying to get the image size properties of it.
//Write the XML file for Flex to use
$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output = "<formData>";
$xml_output = "<image>";
$xml_output = "<imageURL>".$myImage.</imageURL>";
$xml_output = "</image>";
$xml_output = "</formData>";