views:

136

answers:

1

Hi. I want to be able to load an external text from an http request to a string in my flash application.

i know that with loadvars i can load variables, when the output is as: key=value&key=value.. but this is not the case here. i get in return a string with several random characters. how can i properly retrieve them ?

A: 

Hi. I resolved the issue by applying toString() on the return object of the onLoad event using an XML object:

var x = new XML();
x.load('url');
x.onLoad = function(success) {
if (success)
   var data=this.toString();
}
ufk
That's clever... I had been wondering if some PHP could be used to wrap some tags around the content of your text file, but this is much easier.
Richard Inglis
thank you for your kind words! :)
ufk