1 Reply Latest reply on Oct 2, 2007 2:39 PM by DaNall

    Error in an image gallery with XML and FlexBuilder 2...help!

      Hi all, i've made a state where i want a imggallery to be, here is the code i've used:
      in Application i've added:

      creationComplete="imagesIn.send()" xmlns:cmp="*"

      and an mx:script:
      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;

      public var imagesArr:ArrayCollection;

      public var selectImages:Object;

      public function retrieveDataHandler(event:ResultEvent):void {

      imagesArr = event.result.listImages.images;


      added a HTTPservice:

      <mx:HTTPService id="imagesIn" url="XML/imageList.xml" result="retrieveDataHandler(event)"/>

      in the Panel in the gallery state i added a VBox and a tilelist:

      <mx:VBox x="38" y="316" height="100%" id="boxImage">
      <mx:TileList dataProvider="{imagesArr}" id="thumb" itemRenderer="ShowImage"
      paddingBottom="10" width="525"/>

      In the XML there are the links to the imageshack images i want to show.

      Now, when i run the project, it doesn't give me any error during the compiling, but when the project starts:

      "[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: file:///Users/kimeraStudio/Documents/Flex Builder 2/Prova/bin/XML/imageList.xml"]. URL: XML/imageList.xml"]
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
      at mx.rpc::Responder/fault()
      at mx.rpc::AsyncRequest/fault()
      at private::DirectHTTPMessageResponder/errorHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
      at [io]"

      The XML file is located inside an "XML" folder inside the root of the project.

      I've also made a ImageRenderer in an external MXML file:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Image xmlns:mx=" http://www.adobe.com/2006/mxml">


      What happened? Why it doesn't work?

      Sorry for bothering you but it's important and i'm still a n00b with Flex!
      (PS: sorry also for the bad english but i'm italian :P )