Ok, so I have a guest book that I am working off of, found here. But it uses the button component, which is just too large and unpretty for my tastes. How do I replace the button component with the myButton movieClip. I have tried just a straight swap, but that doesn’t work. The AS on the button is:
on(click){
/*
Modify these reference paths to yours if you
have changed them. Also modify gb_status
reference path if required
*/
yourname = _parent._parent.write.yourname.text;
youremail = _parent._parent.write.youremail.text;
yourcomments = _parent._parent.write.yourcomments.text;
// Check variable data
if (yourname eq "") {
_parent._parent.write.gb_status.text = "Required: Name";
} else if (youremail eq "") {
_parent._parent.write.gb_status.text = "Required: Email Address";
} else if (!youremail.length || youremail.indexOf("@") == -1 || youremail.indexOf(".") == -1) {
_parent._parent.write.gb_status.text = "Required: Valid Email Address";
} else if (yourcomments eq "") {
_parent._parent.write.gb_status.text = "Required: Comments";
} else {
_parent._parent.write.gb_status.text = "Please wait...";
newEntry = new LoadVars()
newEntry.ref = this
newEntry.submit = "Yes"
newEntry.yourname = yourname
newEntry.youremail = youremail
newEntry.yourcomments = yourcomments
newEntry.sendAndLoad("GuestBook.php?action=write&r="+random(999), newEntry, "POST")
newEntry.onLoad = function(success){
if(success){
_parent._parent.write.gb_status.text = this.gb_status;
_parent._parent.read.loadEntries("Default", 10);
// Clear fields
_parent._parent.write.yourname.text = "";
_parent._parent.write.youremail.text = "";
_parent._parent.write.yourcomments.text = "";
}
}
}
}
Any help would be greatly appreciated.