Converting the return values of URL Loader into an array in Actionscript 3

I am taking values from an Access database into an ASP file and from there into Flash.
I am getting the data ok, but however I am having problembs converting that data from the loader object into an Array.

These are the values I am getting in Flash from ASP. What is the best way to convert this into an array?

completeHandler: 1/2/2007,56.036,56.2,55.94;01/3/2007,56.023,56.197,55.94;01/1/2008,18.847,0,0;02/1/2008,18.86,0,0;03/1/2008,18.845,0,0;04/1/2008,18.842,0,0;05/1/2008,18.848,0,0;06/1/2008,18.856,0,0;07/1/2008,18.855,0,0;08/1/2008,18.855,0,0;0

 If anyone can helpe me out, it will be greatly appreciated.

ASP CODE Snippet:
Do While not rsLakes.EOF

      Response.Write (rsLakes("SDate"))
      Response.Write (",")      
      Response.Write (rsLakes("DailyL"))
      Response.Write (",")      
      Response.Write (rsLakes("High"))
      Response.Write (",")      
      Response.Write (rsLakes("Low"))
      Response.Write (";")      
      Response.Write (rsLakes("Curve"))
      Response.Write (" ; ")      

      'Move to the next record in the recordset


function lakes(){
	var loader:URLLoader = new URLLoader();
var nrequest:URLRequest = new URLRequest("lakes.asp");
var variables:URLVariables = new URLVariables();
variables.LNumber = glo.bal.lakeNumber; = variables;
nrequest.method = "POST"; // !! this is the default 
        function configureListeners(dispatcher:IEventDispatcher):void {
            dispatcher.addEventListener(Event.COMPLETE, completeHandler);
            dispatcher.addEventListener(Event.OPEN, openHandler);
            dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
            dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
            dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
		function completeHandler(event:Event):void {
            var loader:URLLoader = URLLoader(;
 trace("completeHandler: " +;}
        function openHandler(event:Event):void {
            trace("openHandler: " + event);
       function progressHandler(event:ProgressEvent):void {
            trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
        function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        function httpStatusHandler(event:HTTPStatusEvent):void {
            trace("httpStatusHandler: " + event);
        function ioErrorHandler(event:IOErrorEvent):void {
            trace("ioErrorHandler: " + event);

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

i'll send you an example in a minute
Here it goes. If you have any doubts let me know
function completeHandler(event:Event):void {
      var loader:URLLoader = URLLoader(;
      trace("completeHandler: " +; 
      //now let's convert it to an array
      var splitRows:Array =";");//returns array from string, breaking items by delimiter ";"
      var rows:Array = [];//the final array
      for(var i = 0; i < splitRows.length;i++){
       //here you can access the bidimensional array like this
      trace(rows[0][2]);//traces 56.2, 3rd field in 1st row

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TheMagellanCloudsAuthor Commented:
Thanks a lot man that worked like a charm!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.