1. Place last
email.sendAndLoad('
http://www.promocasa.com.mx/tools/formaCorreo.aspx',
emailResponse, "GET");
You have a potential timing issue where emailResponse.onLoad
=
function(success:Boolean) is not assigned before the response
is registered.
something = function is a run time assignment and needs to be
processed
before it has potential to be used.
2. Did you try "POST" instead of "GET"?
3. Is Flash Movie on the same domain as www.promocasa.com.mx.
If not you
need a crossdomain.xml file.
4. Try a very basic Flash movie that simply sends and
receives some static
data from your server.
5. Add some traces to the emailResponse.onLoad
trace ("emailResponse.onLoad - succes:"+success);
6. Be sure you do not have a cached old version of the Flash
movie in your
web browser. A quick way is to rename it temporarily and
upload.
7. Not sure about your scoping since it works locally, but
for a test define
var email:LoadVars = new LoadVars();
var emailResponse:LoadVars = new LoadVars(); on the timeline
and comment
inside the on(click)
--
Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!
"saldillo" <webforumsuser@macromedia.com> wrote in
message
news:ed70m3$6ei$1@forums.macromedia.com...
> Yup, I already did that.
>
> I created a basic HTML page that has a bunch of hidden
fields that
> represent
> the data being sent by the flash movie. I uploaded it to
the same server
> where
> I uploaded the SWF to see if it had anything to do with
the server but
> alas,
> when I press the submit button on the HTML page it shows
the OK message
> that is
> being sent by the ASP page, and I received the email
just fine.
>
> I never receive the email when I press the submit button
on my uploaded
> SWF
> movie, which leads me to believe that the ASP page is
not receiving the
> information.
>
> I'm attaching my AS code, I forgot to do so in my
original posting.
>
> Thank you for your replies.
>
>
>
> on (click) {
> var email:LoadVars = new LoadVars();
> var emailResponse:LoadVars = new LoadVars();
>
> // This is the data that the user entered in the contact
form.
> email.txtNombre = _parent.txtNombre.text;
> email.txtEmail = _parent.txtEmail.text;
> email.txtTelefono = _parent.txtTelefono.text;
> email.txtComentarios = _parent.txtComentarios.text;
>
> // My ASP page should work for any SWF movie so I put
this here for each
> movie that
> // sends data to the server. Once I get this working the
way it
> should, I'll load the info from a text file to
> // avoid hard coding it in the movie.
> email.txtEmailReceptor =
"aldo.herrera@promocasa.com.mx"; // Who should
> receive the email
> email.txtEmailEmisor =
"contactos@barcelonaresidencial.com.mx";
> email.txtDesarrollo = "Barcelona Residencial"; // What
webpage
> originated
> this request
> email.txtAsunto = "BARCELONA: Forma de contacto del
sitio web Barcelona
> Residencial"; //Subject
> email.txtMensaje = "Se ha recibido una petici?n de
informaci?n del sitio
> web
> Barcelona Residencial."; //
> email.sendAndLoad('
http://www.promocasa.com.mx/tools/formaCorreo.aspx',
> emailResponse,
> "GET");
>
> emailResponse.onLoad = function(success:Boolean) {
> var strSuccess:String = "?Gracias por tu inter?s! Uno de
nuestros
> asesores
> recibi? tu petici?n y se pondr? en contacto para
atenderte.";
> var strError:String = "Lo sentimos. Hubo un error
t?cnico al enviar tu
> informaci?n. Por favor cont?ctanos por tel?fono para
poder atenderte.
> Disculpa
> las molestias.";
> var strMensaje:String = this.mensaje;
>
> if ( success) {
> _parent.estado_txt.text = strMensaje; // Print the
message to a
> dynamic text field called "estado_txt"
> _parent.nextFrame(); // This removes my input form and
shows the
> estado_txt field.
> }
> /*
> if ("OK" == strMensaje.substr(0,2) )
> _parent.estado_txt.text = strSuccess;
> else
> _parent.estado_txt.text = strError;
>
> _parent.nextFrame();
> */
> };
> }
>