0 Replies Latest reply on Nov 11, 2009 10:18 AM by brian914

    s:HTTPService not loading?

    brian914 Level 1

      I am learning Flash Builder and am having a hard time figuring out this issue. For some reason, my HTTPService is not loading my xml document and I can't figure out why. I think I am sure I am requesting it from the right location.

       

      Thanks a lot for any help with this!

       

      Here is what I have:

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application 
           xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/halo" 
           applicationComplete="app1_applicationCompleteHandler(event)"
           minWidth="1024" minHeight="768">
      
           <!-- Script ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
           <fx:Script>
                <![CDATA[
                
                     // import statements ----------------------------------------
      
                     import mx.events.FlexEvent;
                     import mx.rpc.events.FaultEvent;
                     import mx.rpc.events.ResultEvent;
                     // event handlers -------------------------------------------
      
                     protected function thumbXML_resultHandler(event:ResultEvent):voi
                     {
                          trace(thumbXML.lastResult.thumbs.thumbHolder[0].imag;
                     }
      
                     protected function thumbXML_faultHandler(event:FaultEvent):void
                     {
                          trace("XML did not load: " + event.toString());
                     }
      
                     protected function app1_applicationCompleteHandler(event:FlexEvent):void
                     {
                          thumbXML.send();
                     }
      
                ]]>
           </fx:Script>
           <!-- Declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
           <fx:Declarations>
                <s:HTTPService id="thumbXML"
                     request="xml/thumbs.xml"
                     result="thumbXML_resultHandler(event)"
                     fault="thumbXML_faultHandler(event)"/>
           </fx:Declarations>
      
           <!-- UI components ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
      </s:Application>