hi,

I am rather new to flex and this is one of my amateur attempts at building 
RIAs. My application at present includes a tree menu, items of which when 
dropped onto a canvas opens up window components. Each window sends a http 
request that gets the appropriate data onto the display of the window. 
when i include multiple http requests at a given time, the data relevent to the 
most recent request is only being displayed. How do I display data from other 
http requests simulatenously?
a portion of my code is here
<mx:HTTPService id="userRequest" url="http://localhost/mydoc.php " 
useProxy="false" method="POST" result="sHandler(event)">
      <mx:request xmlns="">
      </mx:request>
   </mx:HTTPService>
     <mx:HTTPService id="userRequest1" url="http://localhost/mydoc1.php " 
useProxy="false" method="POST" result="sHandler(event)">
      <mx:request xmlns="">
      </mx:request>
   </mx:HTTPService>

  public function onDragDrop(event:DragEvent):void{

        var myWindow:ResizableTitleWindow = new ResizableTitleWindow();
        var myTextArea:Text = new Text();
        var ds:DragSource = event.dragSource ;
        if( !ds.hasFormat("treeItems") ) return; // no useful data
            var items:Array = ds.dataForFormat("treeItems") as Array;
        for(var i:Number=0; i < items.length; i++) {
            var item:XML = XML(items[i]);
        if( [EMAIL PROTECTED] == "ms"){

            userRequest.send();
    myTextArea.text= userRequest.lastResult.slk;

}
else if([EMAIL PROTECTED] == "hr"){
userRequest1.send();
myTextArea.text = userRequest1.lastResult.slk;
}
}
myWindow.label = "New Window";
myWindow.x = xvalue;
myWindow.y = yvalue;
myWindow.addChild(myTextArea);
home1.addChild (myWindow);
}
public function sHandler(event:ResultEvent):void
            {
                
                myTextArea.text = event.result.slk ;

            }    

A friend of mine suggested to your URLLoader instead of HTTPRequest...how do I 
go about with that?..Please help me

Thanks in Advance,
Sudha Hariharan. 

 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php

Reply via email to