Hi I've recently learned that the problem is not the code, is my server, the hosting support team is working on that...hoooray!
I hope those guys could do something.

Regards,

Gustavo
On Aug 9, 2009, at 7:16 PM, Karl DeSaulniers wrote:

Gus,
Can you send me a fla offline with all your fields and code in it?
Or I can send you the PHP file and you can adopt/edit/test the variables used.

LMK,

Karl

On Aug 8, 2009, at 11:14 PM, Gustavo Duenas wrote:

by the way this is the code I have could you check it from the side of the flash if this is ok.

appreciate it .


Gustavo

stop();

import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
// ----------------------------------------------------------------
var variables:URLVariables = new URLVariables();
// Be sure to change this URL to the PHP parse file on your site server
var varSend:URLRequest = new URLRequest("sendMail.cfm");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;

this.status_txt.text = "";

this.sent.addEventListener(MouseEvent.CLICK, ValidateAndSend);


function ValidateAndSend(event:MouseEvent):void{
        
    //validate form fields
        if(!nombre.length) {
                status_txt.text = "Please enter your name.";  
        } else if(!email.length) {
                status_txt.text = "Please enter an email address";
        } else if(!validateEmail(email.text)) {
                status_txt.text = "Please enter a VALID email address";
        } else if(!details.length) {
                status_txt.text = "Please enter a message.";
        } else if (!phone.length){
                status_txt.text ="enter you phone number";
        }else if(!address.length){
                status_txt.text ="enter your address";
        }else if(!eventos.length){
                status_txt.text="please enter your event description";
        }
        
        
        
        else {
                
status_txt.text = "Thanks " + nombre.text + ", your message has been sent!";
                
                variables.nombre = nombre.text;
                variables.email = email.text;
                variables.phone = phone.text;
                variables.address=address.text;
                variables.eventos=eventos.text;
                variables.detalle = details.text;
                varLoader.load(varSend);

        gotoAndStop(2);
                
        }
}

function validateEmail(str:String):Boolean {
        var pattern:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
        var result:Object = pattern.exec(str);
        if(result == null) {
                return false;
        }
        return true;
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to