This is a discussion on Sending and Receiving values between Flash and .NET(sendAndLoad) within the Flash Actionscript Programming forums, part of the Web Development category; Sending and Receiving values between Flash and .NET Data transfer between Flash And .Net Sending And Receiving data between flash ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Sending and Receiving values between Flash and .NET Data transfer between Flash And .Net Sending And Receiving data between flash and asp.net. To do this we must use SendAndLoad object in flash. Syntax: myLoadVars .sendAndLoad( url , targetObject [ ,method ] ) Parameters: loadVarsObject The LoadVars object to upload variables from. url The URL to upload variables to. targetObject The LoadVars object that receives the downloaded variables. method The " GET " or " POST " method of the HTTP protocol. Description Method; posts variables in the myLoadVars object to the specified URL. The server response is downloaded, parsed as variable data, and the resulting variables are placed in the targetObject object. A sample demonstration is given below 1) Create a Flash Document. 2) Create two textboxes and give instance name as "input_txt", "output_txt". 3) Create a button and give its name as "btnSendAndLoad". 4) Write the following codes in the Main Timeline. var myLoadVar:LoadVars=new LoadVars(); var outputData:String; var inputData:String; btnSendAndLoad.onRelease=function(){ var result_lv:LoadVars=new LoadVars(); result_lv.onLoad=function(Sucess){ if(Sucess){ output_txt.text=result_lv.outputData; } } myLoadVar.inputData=input_txt.text; output_txt.text="Loading..."; myLoadVar.sendAndLoad("transfer.aspx", result_lv, "GET"); } 5) Create a web project in asp.net and embed the swf file in the default page. 6) Create another page called transfer.aspx in the same project and copy the following code in the page load event. protected void Page_Load(object sender, EventArgs e) { string outputData = ""; outputData = Request.QueryString.Get("inputData"); Response.Write("outputData="+outputData); } 6) Place all the files in server and run it. |
| Sponsored Links |
| |||
| Hi, This is a good one. But this is like calling the server side script from flash. We can apply the same method to call any type of server side scripting like asp.net, Coldfustion PHP etc. Do you know one thing, instead of calling the server side file, flash has given the option to call the server side webservices. This is also a good concept to call the server side functions alone not the full program file. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Data Transfer using XML.sendAndLoad and PHP | oxygen | Flash Actionscript Programming | 2 | 03-15-2008 02:57 AM |
| How to attach file when sending a mail via flash form? | aramesh | Flash Actionscript Programming | 1 | 03-07-2008 01:55 AM |
| Sending message to mobile using php | saravanan | PHP Programming | 6 | 01-02-2008 12:05 AM |
| "POST" large amount of data using SendAndLoad (Exporting JPG/JPEG) | aramesh | Flash Actionscript Programming | 2 | 12-28-2007 02:42 AM |
| Sending SMS through ASP.Net | S.Vinothkumar | ASP and ASP.NET Programming | 12 | 09-17-2007 05:29 AM |