I’m trying to create a basic interaction between flash and ASP.net v1.1.
In flash code I’m using the LoadVars function and on asp.net page I’m using “Response.write” to return the value to flash.
I have a flash button which send the load to the asp.net.
MY CODE WORKS , BUT ONLY ONE TIME!
(meaning the first time I click the button , the asp.net page is called and return the value , but the second time nothing happens!)
Here is my code:
FLASH:
function doCheck()
{
checkSessID = new LoadVars();
checkSessID.onLoad = function (serverIsOnline)
{
if (this.success == "true")
{
} // end if
};
checkSessID.load("http://" + "localhost/FlashTest" + "/IM/IMService.aspx?command=validateuser&sessID=" + "1" + "&username=" + myName);
}
private void SendResponse()
{
string result = "true";
Response.Clear();
Response.Write(String.Format("&success={0}&", result) );
Response.Flush();
return;
}
The first time in click on the flash button the doCheck() function is called and the sendResponse function (which is in the “IMService.aspx”) return the value to flash.
Then , when clicking the second time on the button , nothing happens
Any idea why this works only once?
THANKS!