Contact form

Hello, first time poster, long time visitor…

Anyway, had a question regarding a contact form created in one SWF, but downloaded externally into a master SWF. The form works fine, but the result of the form submission doesn’t want to jump forward to either the “success” or “fail” frame of the contact form’s SWF.

Below is the code of the form:


stop();

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
	senderLoad.theName = theName.text;
	senderLoad.theEmail = theEmail.text;
	senderLoad.theMessage = theMessage.text;
	senderLoad.sendAndLoad("http://www1.indstate.edu/wisu/newsite/contact.php",receiveLoad);
}

receiveLoad.onLoad = function() {
	if(this.sentOk) {
		_root.gotoAndStop("success");
	}
	else {
		_root.gotoAndStop("failed");
	}
}

The master SWF file is just a series of externally loaded SWFs by way of the following code:


on (release) {
	_root.section = "contact.swf";
	_root.transition.gotoAndPlay("closing");
}

I’ve pretty much guessed that it’s confused with the loading of the SWFs from the _root part, but am not sure what to use to tell the contact.swf to advance the script to the “success” or “fail” frame after the user submits the form.

Any ideas?

Thanks for any info!