Sending dynamic data to server and back in flash
Tags: actionscript, data, dynamic, flash, load, loadvars, sendandload
This tutorial shows how to send data from flash to php then change the data and send back to flash using LoadVars.
First the actionscript that is ran from the frame:
var retrieveLoadVars:LoadVars = new LoadVars();// setup object to catch data from remote file
var sendLoadVars:LoadVars = new LoadVars(); // setup object to send data to remote file
retrieveLoadVars.onLoad = function(success) // call function when data is loaded
{
if(success) //function to run if data has been loaded
{
trace(retrieveLoadVars.name1);// print out results to the output window
trace(retrieveLoadVars.name2);// print out results to the poutput window
} else //data not loaded
{
trace(”error”);// print out error to the poutput window
}
}
sendLoadVars.param1 = “flash”;//send … Continue Reading