开发者

actionscript 3 file reference response data after uploading a file

I have written a ac3 script to upload files to remote servers and it is working as expected with all the events.

From the server side script i am echoing some text according to the upload status and i want that status to be received in flash like response text in ajax.

Is it possible to receive response text from a server script after uploading a file.

Or it doesn't have to be a file upload yet i wanted to have the string echoed in the server side script as response text in flash.

If that is not po开发者_如何学运维ssible like ajax or normal request and response then is there another ways of achieving that?

Here is the code which gets executed when upload is complete.

fr.addEventListener(Event.COMPLETE, function(e:Event): void
{
    lblPer.text = 'Completed';
//  ExternalInterface.call("uploadError",e.target.data);

})

where fr is FileReference object.


Try listening for DataEvent.UPLOAD_COMPLETE_DATA. That should have a data property on it that you can read the response from.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜