Flex中使用Google

王朝c#·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

以下是我的google搜索

首先的申请一个Account,然后得到他的lisence Key

这样就可以根据wsdl来构造xml提交给api。

程序如下:

<maxResults>10</maxResults>

<filter>true</filter>

<restrict></restrict>

<safeSearch>true</safeSearch>

<lr></lr>

<ie></ie>

<oe></oe>

</mx:request>

</mx:operation>

</mx:WebService>

<mx:Panel styleName="blackFont" title="Google Search" width="500">

<mx:HBox>

<mx:TextInput id="q" width="210"/>

<mx:Button label="Search" click="ws.doGoogleSearch.send()"/>

</mx:HBox>

<mx:DataGrid id="resultsGrid"

dataProvider="{ws.doGoogleSearch.result.resultElements}"

width="100%"

height="400">

<mx:columns>

<mx:Array>

<mx:DataGridColumn columnName="title" headerText="Title" width="120"/>

</mx:Array>

</mx:columns>

</mx:DataGrid>

</mx:Panel>

</mx:Application>

结果如下图:

本主题包含附件:
sf_2004111101824.jpg (34139bytes)

CSDN BLOG: http://blog.csdn.net/stefli

stefli's MP3: http://stefli.88ip.net/Flex/mp3Player.swf

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航