I have a simple swf file upload script that uploads a file as soon as user selects it. It works fine however I'm trying to pass the saved filename from the php script (simple echo "file_name.txt";) back to the swf so it can pass it back to the form via javascript.
Here's a simple snippet of the AS2 code, can someone who has some experience with the FileReference component help me out with a solution to get the output from the php script?
var file_fr:FileReference = new FileReference();
var list_obj:Object = new Object();
list_obj.onComplete = function() {
// need to get response text from script.php
}
file_fr.addListener(list_obj);
if (!file_fr.upload("/path/to/script.php")) {
feedback.text = "error";
}