Based on what I remember when implementing similar thing myself and this question you need to add ob_flush() along with flush(). I honestly not sure why this works, but it did work for me, and apparently worked for the other user, too.
ob_flush()
flush()