Hi All, I have a problem reading a sequence of 5 xml files (test1.xml, test2.xml etc.) in my flex unit test... I need to read these files and validate info in each of them... Looks like this conflicts with using addAsync() calls. I have the following code in my test class: public function testResults():void { var vcc:HTTPService;
for ( var i:int = 1; i <= 5 i++) { vcc = new HTTPService(); vcc.url = "test" + i + ".xml"; vcc.resultFormat = "text"; vcc.addEventListener (ResultEvent.RESULT, addAsync(handler,1500), false,0,true); vcc.send(); } } public function handler(e:ResultEvent):void { var resp:String = e.result.toString(); var fileName = e.currentTarget.url; Alert.show(resp + " " + fileName); . . . . . . } Even though I loop in the testResults test function, it looks like I get the handler for the same vcc (HTTPService) to fire, i.o. my Alert stmt fires 5 times, but the resp and fileName values are the same each time (for test1.xml) Any idea of how to iterate through all xml file names/file contents? Thank you, EP