I need an example of how to use sendAndLoad.
I've looked up the help in the Flash files, but am not getting anywhere.
I have on stage a movie called mainOrderReviewMovie that contains simple bits used to try and send data and receive data back.
I have the following code (adapted from the Flash help files):code:
mainOrderReviewMovie.onRelease = function()
{
submitListener();
}
function submitListener()
{
var send_lv:LoadVars = new LoadVars();
var result_lv:LoadVars = new LoadVars();
send_lv.email = mainOrderReviewMovie.email.text;
send_lv.sendAndLoad("http://www.myDomain.com/email/cdontsExample.asp", result_lv, "POST");
result_lv.onLoad = function(success:Boolean)
{
if (success)
{
mainOrderReviewMovie.resultsText.text = result_lv.welcomeMessage;
// How do I send back variables!!?
}
else
{
mainOrderReviewMovie.resultsText.text = "Error connecting to server.";
}
};
};
All I seem to be getting is "Error connecting..."
My asp code is as follows:
code:
<% @language="VBSCRIPT" %>
<%
Set objMail = Server.CreateObject("CDONTS.Newmail")
objMail.To = request.form ("email")
objMail.Subject = "Testing the system"
objMail.From = "me@mydomain.com"
objMail.Body = "nothing here"
objMail.Send
Set objMail = Nothing
%>
I can't figure out where I'm going wrong.
I've attached my Fla... if that's any help.
ANY help would be greatly appreciated.
Thanks.
OM
(This post is an extentsion of my last one - apologies if this is repeat posting.)