Here is the code one of my friend asked, he wanted flash to submit some data on click of a button. This script assumes you have a Movieclip with instance name “but1” on stage.
but1.addEventListener("click",submitContact); function submitContact(e:Event) { var variables:URLVariables = new URLVariables(); var varSend:URLRequest = new URLRequest("email.php"); var varLoader:URLLoader = new URLLoader; varSend.method = URLRequestMethod.GET; varSend.data = variables; variables.Name="Ravi"; variables.Email="Ravi@Some.com"; varLoader.load(varSend) }
Leave a comment