# \[MX\] form check AS

**URL:** <https://forum.kirupa.com/t/mx-form-check-as/64358>\
**Category:** flash\
**Created:** [September 15, 2004, 4:02pm UTC](https://forum.kirupa.com/t/mx-form-check-as/64358 "2004-09-15T16:02:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryall](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Ryall](https://forum.kirupa.com/u/Ryall)\
**Post date:** [September 15, 2004, 4:02pm UTC](https://forum.kirupa.com/t/mx-form-check-as/64358/1 "2004-09-15T16:02:01Z")

</div>

ok I dont get it… I have a simple contact form, and a basic if/else to check if certain fields have been left blank… if they have frame two displays an error message, if filled in then it posts the vars and goes to frame three thanking the user. For some reason this code ALWAYS returns false:

```auto
 on (release) {
	if (name eq "" or address eq "" or city eq "" or state eq "" or zip eq "" or phone eq "" or email eq "" or projects eq "") {
		_root.gotoAndStop(2);
	} else {
		_root.gotoAndStop(3);
		loadVariablesNum("contact.php", 0, "POST");
		
	}
}

```

And this ALWAYS returns true:

```auto
 on (release) {
	if (name == "" or address == "" or city == "" or state == "" or zip == "" or phone == "" or email == "" or projects == "") {
		_root.gotoAndStop(2);
	} else {
		_root.gotoAndStop(3);
		loadVariablesNum("contact.php", 0, "POST");
		
	}
}

```

WTF is going on with this?

peace

---

<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:** [September 15, 2004, 4:14pm UTC](https://forum.kirupa.com/t/mx-form-check-as/64358/2 "2004-09-15T16:14:37Z")

</div>

well I got it to work. That code will only work if the submit button is an actual ‘button’ and not if it is an MC.

Could someone explain why this is, I’d really like to know. Thanks in advance.

Peace

---

<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:** [September 15, 2004, 7:14pm UTC](https://forum.kirupa.com/t/mx-form-check-as/64358/3 "2004-09-15T19:14:23Z")

</div>

when writing code on a button, the script referes to the timeline that the button is instanciated on.  
when writing code on a mc, it is as if you wrote the code on that mc’s timeline.  
So what on a btn is this., is \_parent., when written on a mc.  
Hope that made some sence!?
