1 person found this helpful
Your first problem is that img1 and title don't exist until after you have loaded the xml file, you can't populate your image or text components until you have retrieved the data.
So after the xml is retrieved you can populate the text field(in the result handler), Then you need to retrieve the image with a url loader so that you can populate the image component. By simply giving the image name to the image component will result in the component recieving no content so the correct process is to get the data for the image once you have that data pass it to the image component.
I think that I know what you mean, but I can't seem to get it to work.
could you please give me an example of how I could do this.
The following example is similar to what you want, the difference is that it loops through the xml once it has retrieved it and downloads the images into an array.
I have enabled source view (right click on the swf to get its source code)
Just a note this was done using an updated sdk (dec' 09) so it would be better to get a recent/nightly build of the flex 4 sdk if you want to copy the project into your Flashbuilder IDE.