3 Replies Latest reply on Sep 17, 2010 6:40 PM by Mark Robbins 312

    Crawling information from Wikipedia

    bryant_16

      Hey guys,

       

      Is the above possible for Flex at this moment?    

        • 1. Re: Crawling information from Wikipedia
          bryant_16 Level 1

          Anyone have any ideas to this issue?    

          • 2. Re: Crawling information from Wikipedia
            bryant_16 Level 1

            Anyone have any ideas?    

            • 3. Re: Crawling information from Wikipedia
              Mark Robbins 312

              For FlashBuilder:

               

               

              <?xml version="1.0" encoding="utf-8"?>
              <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx">
                <fx:Declarations>
                  <!-- Place non-visual elements (e.g., services, value objects) here -->
                  <s:HTTPService id="remoteService" resultFormat="text"
                    fault="onFault(event)" method="GET"
                    result="onResult(event)"/>
                </fx:Declarations>
                    <fx:Script>
                      <![CDATA[
                        import mx.rpc.events.FaultEvent;
                        import mx.rpc.events.ResultEvent;

                        private var page:XML;
                        private var _src:String='http://www.synonyms.ca/a-synonyms-1.htm';

                        [Bindable]
                        private var youtube:String;


                        private function getData(event:Event):void
                        {
                          ta1.text = "";
                          remoteService.url = _src;
                          remoteService.send();
                        }
                        private function onResult(event:ResultEvent):void
                        {
                          ta1.text=event.result.toString();
                        }
                        private function onFault(event:FaultEvent):void
                        {
                          ta1.text = " \n Error: " + event.fault;
                        }
                      ]]>
                    </fx:Script>
                <s:TextArea id="ta1" x="64" y="81" width="269"/>
                <s:Button x="166" y="298" label="Button" click="getData(event)"/>
                <s:TextArea x="403" y="81"/>
              </s:WindowedApplication>