Código PHP:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundGradientColors="[0xFFFFFF,0xAAAAAA]"
horizontalAlign="left"
verticalGap="15" horizontalGap="15">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var photoFeed:ArrayCollection;
private function requestPhotos()
:void
{
photoService.cancel();
var params:Object= new Object();
params.format= 'rss_200_enc';
params.tags= searchTerms.text;
photoService.send(params);
}
private function photoHandler(event:ResultEvent)
:void
{
photoFeed= event.result.rss.channel.item as ArrayCollection;
}
]]>
</mx:Script>
<mx:HTTPService id="photoService" url="http://api.flickr.com/services/feeds/photos_public.gne" result="photoHandler(event)"/>
<mx:HBox width="100%">
<mx:Label text="Imagen a búsqueda:" fontSize="12"/>
<mx:TextInput width="110" id="searchTerms"/>
<mx:Button label="Buscar" click="requestPhotos()"/>
</mx:HBox>
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
<mx:Component>
<mx:VBox width="125" height="125"
paddingBottom="5"
paddingLeft="5"
paddingTop="5"
paddingRight="5">
<mx:Image width="75" height="75" source="{data.thumbnail.url}"/>
<mx:Text text="{data.credit}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
</mx:Application>