This is my ActionScript3. If I clicked 'do4', I want to pass data to asp.net. But It is not working. I don't know why it is not working. please help me.
do4.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_9);
function fl_MouseClickHandler_9(event:MouseEvent):void
{
var scriptRequest:URLRequest = new URLRequest("/Default.aspx");
var scriptLoader:URLLoader = new URLLoader();
var scriptVars:URLVariables = new URLVariables();
scriptLoader.addEventListener(Event.COMPLETE,handleLoadSuccessful);
scriptLoader.addEventListener(IOErrorEvent.IO_ERROR,handleLoadError);
scriptVars.Location = "Incheon";
scriptRequest.method = URLRequestMethod.POST;
scriptRequest.data = scriptVars;
scriptLoader.load(scriptRequest);
function handleLoadSuccessful($evt:Event):void{
trace("Message sent.");
}
function handleLoadError($evt:IOErrorEvent):void{
trace($evt);
}
}
This is code from asp.net. I have debugged many times. But I have no request about Location data. How do I get the data from flash?
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string str = Request.QueryString["Location"];
System.Diagnostics.Debug.WriteLine(str);
}
}