Page 1 of 1

Help with Flash8 code

Posted: 2006-06-16 03:45pm
by Perseid
Trying to design a website using Studio 8, however I've come across a snag. I can't work out the code for a "Contact" form in Flash and it's driving me mad. The code I've got at the moment is:

Code: Select all

bSubmit.onRelease = function()
{
        email();
}
function email()
{
        var sMessage = "Name: " + tName.text + "\nE-mail: " + tEmail.text + "\Subject: " + tSubject.text + "\nMessage: " + tMessage.text;
        lvSend = new LoadVars();
        lvReply = new LoadVars();
        lvSend.msg = sMessage;
        lvSend.address = "enquiry@ittrainingtorbay.co.uk"; 
        tName.text = "Sending Messageā€¦";
        tEmail.text = "";
		tSubject.text = "";
        tMessage.text = "";
        lvReply.onLoad()
        {
                        tName.text = "Message Sent";
        }
        lvSend.sendAndLoad('mail.php', lvReply, 'POST');
}
But I keep getting error messages when I try publishing, and they don't work when I try them on my site.