I'm working on a batch process script that's executed from Flex. The batch script is in a .aspx Page and returns partial results through the following class:
public class ResponseLogger
{
private HttpResponse _response;
public ResponseLogger(HttpResponse response)
{
this._response = response;
}
public void Start()
{
_response.Clear();
_response.ContentType = "text/plain";
_response.ContentEncoding = System.Text.Encoding.GetEncoding("ISO-8859-1");
}
public void End()
{
_response.End();
}
public void Br()
{
Log("");
}
public void Underline(string message)
{
Log(message);
Log("".PadLeft(message.Length, '-'));
}
public void Log(string message)
{
_response.Write(message + "\n");
_response.Flush();
}
}
In my Flex application I'd like to show the result as soon as it's flushed on server side. Can this be done using Actionscript?