Jump to content


Photo

Flash Form Movie Clip Problem


  • Please log in to reply
No replies to this topic

#1 farrukh_123

farrukh_123

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 02 June 2009 - 01:52 AM

Hello Everybody,
I am having some trouble in my script, i have created a flash form which i have converted into a movie clip named CForm, then i have used variables: name, email, company, telp, message for the input fields: Name, Email, CompanyName, Telephone, Message.
Now the problem is that i don't know how to access variables in the movie clip. I have used the code for the buttons: BtnSend, BtnBack, BtnClr as follows:

Code For BtnSend:
on(release,this.BtnSend)
{
if (CForm.name == "" || CForm.name == null || CForm.email == "" || CForm.email == null ||
CForm.telp == "" || CForm.telp == null || CForm.message =="" || CForm.message == null)
{
//<script type="text/javascript">alert("Empty text fields found"+"\n"+"Please fill out all text
fields to proceed");</script>
CForm.gotoAndPlay(2);

}
else if((CForm.name.Length < 1) | (CForm.email.Length < 1) | (CForm.company.Length < 1)
| (CForm.telp.Length < 1) | (CForm.message.Length < 1))
{
//<script type="text/javascript">alert("Empty text fields found"+"\n"+"Please fill out all
text fields to proceed");</script>
CForm.gotoAndPlay(2);
}
else if((CForm.email.Length < 1) && (CForm.email.text.indexof("@")==-1))
{
Alert("Invalid email address found,Please provid a valid email address to proceed");
//<script type="text/javascript">alert("Invalid email address found"+"\n"+"Please provid a
valid email address to proceed");</script>
CForm.gotoAndPlay(3);
}
else if ((CForm.name != "" || CForm.name != null || CForm.email != "" || CForm.email != null ||
CForm.telp != "" || CForm.telp != null || CForm.message != "" || CForm.message != null)
| ((Cform.name.Length >= 1) | (CForm.email.Length >= 1) | (CForm.company.Length >=
1) | (CForm.telp.Length >= 1) | (CForm.message.Length >= 1)))
{
CForm.getURL("mailto.php", "_self", "POST");
//getURL("Feedback.php",0,"POST");
CForm.gotoAndPlay(4);
}
}


Code For BtnBack:
on(release,this.BtnBack)
{
CForm.gotoAndPlay(1);
}

Code For BtnClr:
on(release,this.BtnClr)
{
CForm.name="";
CForm.email="";
CForm.telp="";
CForm.company="";
CForm.message="";
}


On frame 1 of the movie clip i have the main form with input fields, on frame 2 of the movie clip i have an error message saying all fields must be filled out with a button BtnBack, on frame 3 of the movie clip i have an error message saying invalid email address found with the same button BtnBack, on frame 4 i have a reply message saying that your email has been sent to us with the same BtnBack button.
The error messages and reply message are all text fields.

You can view the contact form on this site
www.res-solutions.net
page --> contacts.

Please help me soon, only the clear button is working, don't know how to navigate my form to frame 2, 3 and 4.
Please help me soon, asap, my project is stuck and i have to report to my boss as early as possible.

Edited by farrukh_123, 02 June 2009 - 02:27 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users