3 Replies Latest reply on Sep 11, 2009 7:54 AM by oli4dejonge

    Problem loading twitter search result gotoAndLearn tutorial

    oli4dejonge

      Hi,

       

      I implemented the twitter search example and when I do a request I don't get a result nor fault back from the HTTP service. I'm working a windows XP. Anyone familiar with this problem?

       

      <?xml version='1.0' encoding='UTF-8'?>

      <s:Application xmlns:ai="http://ns.adobe.com/ai/2008" xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:fc="http://ns.adobe.com/thermo/2009" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:lib="Main_library.*" height="600" width="800" backgroundColor="#ffffff">

      <fx:Script>

      <![CDATA[

      import mx.rpc.events.FaultEvent;

      import mx.collections.ArrayCollection;

      import mx.rpc.events.ResultEvent;

       

      [Bindable]

      private var ac:ArrayCollection;

       

      protected function Button_click():void

      {

      var state:String = currentState;

      if ( state == 'closed' ) {

      currentState='open';

      }

      if ( state == 'open' ) {

      currentState='closed';

      }

      }

       

      protected function service_resultHandler(event:ResultEvent):void

      {

      ac = event.result.feed.entry as ArrayCollection;

      }

       

       

      protected function searchButton_clickHandler(event:MouseEvent):void

      {

      service.url = "http://search.twitter.com/search.atom?q=" + textinput1.text;

      service.send()

      }

       

       

      protected function service_faultHandler(event:FaultEvent):void

      {

      trace(event.fault);

      }

       

      ]]>

       

      </fx:Script>

      <fx:Declarations>

      <s:HTTPService id="service" result="service_resultHandler(event)" fault="service_faultHandler(event)" />

      </fx:Declarations>

      <s:transitions>

      <s:Transition fromState="closed" toState="open" autoReverse="true">

      <s:Parallel>

      <s:Parallel target="{button2}">

      <s:Move autoCenterTransform="true"/>

      </s:Parallel>

      <s:Parallel target="{rect1}">

      <s:Resize/>

      <s:Move autoCenterTransform="true"/>

      </s:Parallel>

      <s:Parallel target="{textinput1}">

      <s:Fade startDelay="350"/>

      </s:Parallel>

      <s:Parallel target="{button1}">

      <s:Fade startDelay="350"/>

      </s:Parallel>

      </s:Parallel>

      </s:Transition>

      <s:Transition fromState="open" toState="closed" autoReverse="true">

      <s:Parallel>

      <s:Parallel target="{textinput1}">

      <s:Fade/>

      </s:Parallel>

      <s:Parallel target="{button2}">

      <s:Move autoCenterTransform="true" startDelay="350"/>

      </s:Parallel>

      <s:Parallel target="{button1}">

      <s:Fade/>

      </s:Parallel>

      <s:Parallel target="{rect1}">

      <s:Resize startDelay="350"/>

      <s:Move autoCenterTransform="true" startDelay="350"/>

      </s:Parallel>

      </s:Parallel>

      </s:Transition>

      </s:transitions>

      <s:states>

      <s:State name="open"/>

      <s:State name="closed"/>

      </s:states>

      <fx:DesignLayer d:id="2" d:userLabel="Layer 2">

      <s:Rect x="236.5" y="101.5" width="304" height="42" ai:knockout="0" fc:id="2" id="rect1" y.closed="132.5" height.closed="11">

      <s:fill>

      <s:SolidColor color="0xe8e8e8"/>

      </s:fill>

      <s:stroke>

      <s:SolidColorStroke color="0x949494" caps="none" weight="1" joints="miter" miterLimit="4"/>

      </s:stroke>

      </s:Rect>

      <s:Rect x="236.5" y="143.5" width="304" height="364" ai:knockout="0">

      <s:fill>

      <s:SolidColor color="0xf6f6f6"/>

      </s:fill>

      <s:stroke>

      <s:SolidColorStroke color="0x949494" caps="none" weight="1" joints="miter" miterLimit="4"/>

      </s:stroke>

      </s:Rect>

      <s:List x="237" y="143" skinClass="components.DataList1" dataProvider="{ac}" ></s:List>

      <s:TextInput x="247" y="112" skinClass="components.TextInput1" text="" visible.closed="false" id="textinput1"/>

      <s:Button x="236" y="91" skinClass="components.Button2" y.closed="132" id="button2" click="Button_click()"/>

      <s:Button x="464" y="112" click="searchButton_clickHandler(event)" skinClass="components.Button1" label="SEARCH" visible.closed="false" id="button1"/>

      </fx:DesignLayer>

      <fx:Private>

      <ai:PrivateElement d:ref="#2">

      <ai:LayerOptions colorType="ThreeColor">

      <ai:ThreeColor blue="79.31" green="79.31" red="257"/>

      </ai:LayerOptions>

      </ai:PrivateElement>

      <ai:PrivateElement ai:hashcode="6144d74ee0f2f941dd9935b5666bbcee" d:ref="#3">

      <ai:Rect height="21" knockout="0" width="64" x="228.5" y="21">

      <ai:Stroke colorType="ThreeColor" miterLimit="4" weight="1">

      <ai:ThreeColor blue="0.58" green="0.58" red="0.58"/>

      </ai:Stroke>

      <ai:Fill colorType="Gradient">

      <ai:Gradient angle="-90" gradientType="linear" length="63.244" originX="32.5" originY="-4.628">

      <ai:GradientStops>

      <ai:GradientStop colorType="ThreeColor" rampPoint="0">

      <ai:ThreeColor blue="1" green="1" red="1"/>

      </ai:GradientStop>

      <ai:GradientStop colorType="ThreeColor" rampPoint="100">

      <ai:ThreeColor blue="0.702" green="0.702" red="0.702"/>

      </ai:GradientStop>

      </ai:GradientStops>

      </ai:Gradient>

      </ai:Fill>

      <ai:ArtStyle/>

      </ai:Rect>

      </ai:PrivateElement>

      </fx:Private>

      </s:Application>