<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" verticalGap="10"> <mx:Style> .blankFont {font-size:12;} </mx:Style> <mx:WebService id="ws" wsdl="http://api.google.com/GoogleSearch.wsdl" showBusyCursor="true"> <mx:operation name="doGoogleSearch"> <mx:request> <!--This is my Lisence Key--> <key>JRuYnw9QFHKM5XYgSMigEbOleKWNr3Qk</key> <q>{q.text}</q> <start>0</start> <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> |