Hi everyone, 
how can I have this following class return me an ArrayCollection whenever I 
call it????

[Bindable]                      
public class Services
{
public var serviceArray:ArrayCollection;
public var serviceXML:XML;
                
public function getServices():void
{
var service:HTTPService            = new HTTPService();
        service.url                = "test.php";
        service.useProxy           = false;
        service.method             = "POST";
        service.resultFormat       = "e4x";
        service.showBusyCursor     = true;
        service.addEventListener(ResultEvent.RESULT, 
                function (event:ResultEvent):void
                {
                serviceArray       = new ArrayCollection();
                serviceXML         = event.result as XML;
                var ourxml:XML;
                for each(ourxml in serviceXML.elements())             
serviceArray.addItem(ourxml);                                     
                }
        );                                              
        service.send();                 
}
}

Reply via email to