# Embedded movie problem

**URL:** <https://forum.kirupa.com/t/embedded-movie-problem/88285>\
**Category:** flash\
**Created:** [April 28, 2005, 1:37am UTC](https://forum.kirupa.com/t/embedded-movie-problem/88285 "2005-04-28T01:37:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadbach](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@shadbach](https://forum.kirupa.com/u/shadbach)\
**Post date:** [April 28, 2005, 1:37am UTC](https://forum.kirupa.com/t/embedded-movie-problem/88285/1 "2005-04-28T01:37:17Z")

</div>

I am loading .swf files into an other flash movie, so that my navigation buttons and mp3 player don’t have to stop or reload. I have a problem with an e-mail form that I have set up on one of the .swf pages. The e-mail page works great when not embedded in my home flash movie, but once it’s embeddded the e-mail page does not advance to the next frame of the movie. I believe it has something to do with the \_root property that I’m using, but you might know better than me. I would really appreciate any help. My e-mail movie has four frames:

frame 1-contains the input fields (name\_txt, email\_txt, subject\_txt, message\_txt)  
frame 2-processes the users info  
frame 3-tells user of a system error  
frame 4-thanks the user

Here is my code

/_DEFINE SUBMIT BUTTON BEHAVIOR_/  
submit\_mc.onRelease = function() {  
//final check to make sure fields are completed  
if (name\_txt.text != ‘’ &&  
email\_txt.text != ‘’ &&  
subject\_txt.text != ‘’ &&  
message\_txt.text != ‘’) {  
alert\_txt.text=’’;//clear any previous error messages or warnings  
//advance playhead to frame 2 - the “processing” message  
\_root.play();  
//assign properties to LoadVars object created previously  
dataSender.name = name\_txt.text;  
dataSender.email = email\_txt.text;  
dataSender.subject = subject\_txt.text;  
dataSender.message = message\_txt.text;

```
	//callback function - how to handle what comes back
	dataReceiver.onLoad = function() {
		if (this.response == "invalid") {
			_root.gotoAndStop(1);
			alert_txt.text = "Please check email address - does not appear valid."
		} else if (this.response == "error") {
			_root.gotoAndStop(3);
		} else if (this.response == "passed") {
			_root.gotoAndStop(4);
		}
	}
	//now send data to script
	/ *************************
	NOTE: the line below presumes the Flash swf file and php script are in the
	SAME DIRECTORY on your server. If this is not the case (if for example you
	wish to put the php script along with other similar items in a "scripts"
	directory) you MUST MODIFY THE PATH. Otherwise the Flash movie won't be
	able to locate the php script.
	************************* /
	dataSender.sendAndLoad("processEmail.php", dataReceiver, "POST");
} else {
	//warning if they try to submit before completing
	alert_txt.text = "Please complete all fields before submitting form.";
}

```

}
