loadMovie - targeting HELP

Dire need of help,

I’m currently using the tutorial provided by kirupa.com, Preloader & Transitions for Dynamic Files.

Instead of a plain .swf file that is being loaded (loadMovie), i’m trying to load a .swf that contains a feedback form. As you may guess, the fields don’t show up but shows up fine if i open the swf directly. I read over the forums and how many people have had this problem and changing _root to _parent should do the trick. But i’m having no luck. Simply lost. Can someone please help out. TIA.

Welcome, jiggavo. :wink:

You’ll need to either post your code or attach the FLA…

Kode, sorry about that. It’s identical to the tutorials page… The buttons script:
[AS]
b1.onRelease = function() {
if (_root.section != “home.swf”) {
_root.section = “home.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
b2.onRelease = function() {
if (_root.section != “bio.swf”) {
_root.section = “bio.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
b3.onRelease = function() {
if (_root.section != “mystic.swf”) {
_root.section = “mystic.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
b4.onRelease = function() {
if (_root.section != “contact.swf”) {
_root.section = “contact.swf”;
_root.transition.gotoAndPlay(“closing”);
}
};
[/AS]

The movies are loaded with the following script:
[AS]
loadMovie(_root.section, _root.content);
stop();
[/AS]

This all loaded into an empty movie (called content) that preloads the movieclips
[AS]
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
loaded = true;
_root.transition.gotoAndPlay(“opening”);
}
}
}
[/AS]

Again, all of this works fine. It’s just that the movieclips that has the feedback form isn’t loaded properly.

Ehmm… I meant the code in the movie you’re loading dynamically! :stuck_out_tongue:

*Originally posted by kode *
**Ehmm… I meant the code in the movie you’re loading dynamically! :stuck_out_tongue: **

This is a feedback form. On Frame1 i have teh following function:
[AS]
function ckName() {
if (formData.name == “”) {
errBox.setMessage(“You Must Fill In Your Name”);
return false;
} else {
return true;
}
}
function ckEmail() {
if (formData.email == “”) {
errBox.setMessage(“You Must Fill In Your Email Address”);
return false;
} else {
if (formData.email.indexOf(“.”, 0) == -1 || formData.email.indexOf(“@”, 0) == -1) {
errBox.setMessage(“Your Email Address Is Not In Correct Form”);
return false;
} else {
return true;
}
}
}
function clrData() {
this.formData.name = “”;
this.nameIN.text = “”;
this.formData.email = “”;
this.emailIn.text = “”;
this.formData.company = “”;
this.companyIn.text = “”;
this.formData.phone = “”;
this.phoneIn.text = “”;
this.formData.message = “”;
this.messageIn.text = “”;
}
function myOnLoad(success) {
errBox.setEnabled(true);
if (success) {
errBox.setIcon(“info”);
errBox.setTitle(“Thank You”);
errBox.setMessage(“Thank You For Contacting Consulting. We will respond shortly.”);
errBox._visible = true;
clrData();
} else {
errBox.setIcon(“warning”);
errBox.setTitle(“System Error”);
errBox.setMessage(“There has been a system error submitting your email. Please re-submit. Thank you.”);
errBox._visible = true;
}
}
function goPostal() {
if (!ckName()) {
errBox._visible = true;
return;
} else {
if (!ckEmail()) {
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.bu-music.com/cgi-bin/formmail.cgi”, replyData, “post”);
}
[/AS]

Same Frame but different layer:
[AS]
formData = new LoadVars();
formData.name = “”;
formData.email = “”;
formData.company = “”;
formData.phone = “”;
formData.message = “”;

replyData = new LoadVars();
replyData.onLoad = myOnLoad;

globalStyleFormat.FMessageBoxTitleText = new TextFormat( “Arial Bold”, 15, 0xffffff);
globalStyleFormat.applyChanges();
errBox.setButtonWidth(50);
[/AS]

Well, I can’t see anything wrong in the code (as far as addressing is concerned). Would you attach the FLA? :stuck_out_tongue:

Really appreciate the help!

download link

Try this (replace the function):

function goPostal() {
	formData.name = nameIN.text;
	formData.email = emailIn.text;
	formData.company = companyIn.text;
	formData.phone = phoneIn.text;
	formData.message = messageIn.text;
	if (!ckName() || !ckEmail()) {
		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.bu-music.com/cgi-bin/formmail.cgi", replyData, "post");
}

And remove the variable assigned to the text fields. :slight_smile:

:frowning: No… it doesn’t work.

I’m not sure if it’s the external swf files because I have problems with other swf that are simple compared to the feedback one. The other one simply has a text box but when loaded, the box is there but no text is shown.

Oh! I see…

You have two options:

  1. Check your Flash Player version, if it’s lower than 6.0r47… update it!
  2. Embed the font outline.

I didn’t have that problem because I always (try to) have the newest version of the Flash Player!! :stuck_out_tongue:

I believe i have ver7.

How do i go about embedding a font?

Originally posted by jiggavo
How do i go about embedding a font?

!! :wink:

… It’s been already asked a zillion times. :stuck_out_tongue:

lol thanks… embedding font seems to do the trick. However the button component has no text on it. So I think I might have to resort to creating my own image?

Open the Library (F11), you’ll find a symbol called FLabel under the folder Flash UI Components>Component Skins>Global Skins, right click over it, choose Edit from the menu and embed the font outline.

awesome! really appreciate it Kode. You’re a life savior!!!:thumb:

You’re welcome - Glad everything worked out. :beam: