# Forms in a Movie Clip

**URL:** <https://forum.kirupa.com/t/forms-in-a-movie-clip/26757>\
**Category:** flash\
**Created:** [July 26, 2003, 12:43am UTC](https://forum.kirupa.com/t/forms-in-a-movie-clip/26757 "2003-07-26T00:43:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tranism](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tranism/32/269_2.png) [@tranism](https://forum.kirupa.com/u/tranism)\
**Post date:** [July 26, 2003, 12:43am UTC](https://forum.kirupa.com/t/forms-in-a-movie-clip/26757/1 "2003-07-26T00:43:02Z")

</div>

I’ve created a form with validation and it works. Problem is when I place it in a movie clip, then place that movie clip on my timeline. The form no longer works? Any ideas on why this may be happening?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 12:44am UTC](https://forum.kirupa.com/t/forms-in-a-movie-clip/26757/2 "2003-07-26T00:44:23Z")

</div>

Probably a relative adress problem…  
Do you have any \_root reference in the code?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2003, 12:52am UTC](https://forum.kirupa.com/t/forms-in-a-movie-clip/26757/3 "2003-07-26T00:52:46Z")

</div>

I sure don’t. Here’s the code. . .  
[AS]//MY VALIDATION FUNCTIONS  
function vEmail(){  
if(formData.submit\_by == “”){  
errBox.setMessage(“You Must Fill In Your Email Address”);  
return false;}  
else{  
if(formData.submit\_by.indexOf(".",0) == -1 || formData.submit\_by.indexOf("@",0) == -1){  
errBox.setMessage(“Your Email Address Is Not In Correct Form”);  
return false;}  
else{  
return true;}  
}  
}

function vfirstName(){  
if (formData.first == “”){  
errBox.setMessage(“Oop’s, you forgot to fill in your first name”);  
return false; }  
else {  
return true};  
}

function vlastName(){  
if (formData.last == “”){  
errBox.setMessage(“Oop’s, you forgot to fill in your last name”);  
return false; }  
else {  
return true};  
}

function vAddress(){  
if (formData.address == “”){  
errBox.setMessage(“You must enter a valid Address”);  
return false; }  
else {  
return true};  
}

function vCity(){  
if (formData.city == “”){  
errBox.setMessage(“Oop’s, you forgot to fill in your city”);  
return false; }  
else {  
return true};  
}

function vState(){  
if (formData.state == “”){  
errBox.setMessage(“Oop’s, you forgot to fill in your state”);  
return false; }  
else {  
return true};  
}

function vZip(){  
if (formData.postal == “”){  
errBox.setMessage(“Oop’s, you forgot to fill in your zip code”);  
return false; }  
else {  
return true};  
}

//MY CLEAR ALL INPUT FIELDS FUNCTION FOR MY ‘CLEAR’ BUTTON  
function clrData(){  
this.formData.submit\_by = “”;  
this.email.text = “”;  
this.formData.first = “”;  
this.firstname.text = “”;  
this.formData.last = “”;  
this.lastname.text = “”;  
this.formData.address = “”;  
this.address.text = “”;  
this.formData.apt= “”;  
this.apartment.text = “”;  
this.formData.city = “”;  
this.city.text = “”;  
this.formData.state = “”;  
this.state.text = “”;  
this.formData.postal = “”;  
this.zip.text = “”;  
}

//MY REPLY FUNCTION AFTER MESSAGE IS SUCCESSFULLY OR UNSUCCESSFULLY SENT  
function myOnLoad(success){  
errBox.setEnabled(true);  
if(success){  
errBox.setIcon(“info”);  
errBox.setTitle(“Thank You”);  
errBox.setMessage(“Thank You for joining the BCBG mailing list.”);  
errBox.\_visible=true;  
clrData();  
}  
else{  
errBox.setIcon(“warning”);  
errBox.setTitle(“System Error”);  
errBox.setMessage(“Oop’s an error occured while submitting. Please try again.”);  
errBox.\_visible=true;  
}  
}

//MY SUBMIT FUNCTION TO SEND ALL INFORMATION TO MY SCRIPT SERVER SIDE  
function goPostal(){  
if(!vEmail()) {errBox.\_visible=true;return;}  
else if(!vfirstName()){errBox.\_visible=true;return;}  
else if(!vlastName()){errBox.\_visible=true;return;}  
else if(!vAddress()){errBox.\_visible=true;return;}  
else if(!vCity()){errBox.\_visible=true;return;}  
else if(!vState()){errBox.\_visible=true;return;}  
else if(!vZip()){errBox.\_visible=true;return;}

```
errBox.setIcon("info");
errBox.setTitle("Sending Mail");
errBox.setMessage("Your Email Is Being Submitted");
errBox._visible=true;
errBox.setEnabled(false);
formData.sendAndLoad("http://www.bcbg.com/js/flashmailscript.php", replyData, "post");

```

}[/AS]
