<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="srv.send()">
<mx:Script>
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
[Bindable]
public var videos:ArrayCollection;
public function handleResult(event:ResultEvent):void
{
videos = event.result.ut_response.video_list.video;
}
</mx:Script>
<mx:HTTPService id="srv" url="http://server.com/yourvideo"
useProxy="false"
result="handleResult(event)" />
<mx:List width="500" height="500" dataProvider="{videos}">
<mx:itemRenderer>
<mx:Component>
<mx:HBox height="105">
<mx:Image source="{data.thumbnail_url}" />
<mx:VBox width="100%" height="100%">
<mx:Label text="{data.title}"/>
<mx:Text text="{data.description}" width="100%" />
</mx:VBox>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:List>
</mx:Application>
|