Best way to send file between Flash and Win form app

390 Views Asked by At

I know that quick way of communication is ExternalInterface class, but this send params in XML form and might be waste of memory and cause performance hit .

How do I send/receive file/data to/from Action-Script-3 app embedded in C# WinForm?

1

There are 1 best solutions below

0
On

You can use URLRequst in conjuction with URLVariables to exchange data between flash and any server side file.

var request:URLRequest = new URLRequest("<path to asp page>");

var variables:URLVariables = new URLVariables();


variables.content = content_var ;

request.data = variables;

request.method = URLRequestMethod.POST;

var urlLoader:URLLoader = new URLLoader();

urlLoader.addEventListener(Event.COMPLETE, onDataLoad)

urlLoader.load(request);


function onDataLoad(evt:Event) 
{
    trace ( evt.target.data)

    }