PDA

View Full Version : asp + flash



mayur
February 15th, 2006, 04:58 AM
I have posted this in the Flash8 category too .i wish i find the solution here

the asp for me is just not working...
i have this code in my flash file



var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
login.clickHandler = function(evt:Object) {
result_lv.onLoad = function(success:Boolean) {
if (success) {
result_ta.text = "success"
} else {
result_ta.text = "Error connecting to server.";
}
};
send_lv.sendAndLoad("http://localhost/timeSheet/mayur.asp", result_lv, "POST");
};


and just a reponse.write("dONE ") in asp .. when i run asp alone in browser it works..
when i publish the flash file in the flash IDE just by ctrl+enter I can "suceess" in the text box..its just not owrking when i open the swf in browser .

Please help ..

jopiruizen
April 21st, 2006, 10:32 PM
It' won't work because your comments does not have comment.. :cool:

LOL..

Try to check your security at the APplication folder located
C:\Documents and Settings\users\Application Data\Macromedia\Flash Player\#Security

open the flashauthor.cfg and change the

LocalSecurityPrompt=Author to LocalSecurityPrompt=User

the problem you encoutered is because of the security reason of FLash 8

jopiruizen
April 21st, 2006, 10:36 PM
And make sure that the thing you wrote using response.write is URL Encoded.

URL ENCODE. --> &VarName=Value&
Asp Script

<%
response.write("&VarName=Value&")
%>

you can easily target the VarName in Asp by
myLV.onLoad = function(Succes:Boolean){
if(Succes){
myVarInFlash = myLV.VarName
trace(myVarInFlash);
}
}