HttpService 入门例子
Flex HttpService入门例子,最好使用FireFox浏览器(能看到图片)<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="so_hs.send()"><mx:HTTPService id="so_hs" url="http://rss.news.sohu.com/rss/guonei.xml"/><mx:Panel x="64" y="10" width="929" height="275" layout="absolute" title="{so_hs.lastResult.rss.channel.title}" fontSize="13"><mx:AdvancedDataGrid id="dgPosts" dataProvider="{this.so_hs.lastResult.rss.channel.item}" designViewDataType="flat" width="100%" height="100%"><mx:columns><mx:AdvancedDataGridColumn headerText="标题" dataField="title"/><mx:AdvancedDataGridColumn headerText="日期" dataField="pubDate"/></mx:columns></mx:AdvancedDataGrid></mx:Panel><mx:TextArea x="64" y="293" htmlText="{this.dgPosts.selectedItem.description}" width="929" height="273" fontSize="13"/><mx:LinkButton x="921" y="574" id="openLinkButton" label="详细内容" click="navigateToURL(new URLRequest(this.dgPosts.selectedItem.link))" fontSize="12"/></mx:Application>
至于为什么这样取值,
http://rss.news.sohu.com/rss/guonei.xml
右击->查看源码
就知道了
页:
[1]