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.
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.
*Originally posted by kode *
**Ehmm… I meant the code in the movie you’re loading dynamically! **
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;
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.
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.