Having problems with mailscript for my flash site :(
10-22-2008, 03:48 PM
|
Having problems with mailscript for my flash site :(
|
Posts: 23
Name: sassss
|
I want to say hello to all and thanks for letting me a part of this great forum. I am having some problems with my flash site ( www.alliancedirect.net) and I am using Adobe Flash CS4 now with my site with ActionScript 1.0.
I have a form already made on the site (under contact us) but whatever I do....I can't make it work! I use GoDaddy and their gdform.psp is what they provide but they don't give the code in flash. I downloaded some different flash mail scripts and programs but I don't know how to incorporate it within my own site and I don't know what to do! I just want the information to be submitted to me via email and the other forms I will make away from the flash portion if it is too complicated.
Please let me know what specific information you may need from me and how you can hopefully help me as soon as possible as I need this website completely up and running. Again, I appreciatre the help and look forward to being a part of your community!
-sasss
|
|
|
|
10-22-2008, 10:31 PM
|
Re: Having problems with mailscript for my flash site :(
|
Posts: 76
Name: Radley
|
I don't know the first thing about flash, but I remember seeing flash programs that could use HTML formatting so I assume it can handle a basic form.
Here is a simple example of a form script, which because it uses PHP you must upload to a server that has PHP installed (I think GoDaddy websites all have PHP4/5).
http://radgh.com/files/mail.zip
Demo: http://radgh.com/files/mail.html
It includes "mail.html", a simple form similar to the one on your flash website. It does not actually mail your message, but it will display it in mail.php. Notice the form has action='mail.php' and method='post', similarly the PHP file is mail.php, and the variables contained are '$_POST'.
Also keep in mind that if you can get the above example to work, you can get it to mail your form too (As long as your webhost supports mail as well). If you can get the data from the form inside flash to the php script, you can get it to mail with just a few tweaks.
Sending an email is also quite easy with PHP, without using a mailto script. If you're interested you can see an example here:
http://us2.php.net/function.mail
You also get the bonus of choosing how to format your email, which many mailscripts just make the email be generic. You don't even need to learn PHP to do this, basically you just need to copy the example.
Reminder: You can only send mail from your webhost unless you have apache installed, if you are testing your website on your local computer then the PHP script will not work.
|
|
|
|
04-13-2009, 03:20 PM
|
Re: Having problems with mailscript for my flash site :(
|
Posts: 23
Name: sassss
|
Hi you guys! Thanks for the reply back and I apologize for getting back to you late but I would appreciate all the help that I could get.
I am a bit inexperienced with flash (even though I do know the basics) and I am using Flash CS4. Last night I spent 2-3 hours going through all of the flash files along with documention on how to incorporate the flash actionscript within the php correctly but it only let me even more confused...I will provide to you all the information you need (please just ask); but first I have posted the coding below from the "action" from one of the flash forms on my website (the "Refinance" form)....it is extremely long so I have posted it as an image file on my website which is located at http://alliancedirect.net/snagit1.png ...I am online regularly so I will respond very quickly and I do have instant messenger if anyone can help me out with this from there...
The coding below is extremely long and prob. contains a bunch of junk which is not needed and my problem again is not receiving any data and I use GoDaddy so I can use their /gdform.php or another php script if needed
Code:
function submitButtonPress(eventObj) {
var _loc5 = false;
for (var _loc2 = 0; _loc2<reqArray.length; ++_loc2) {
var _loc6 = new FormObject();
if (reqArray[_loc2].objectType == "textinput") {
if (reqArray[_loc2].object.text == "") {
_loc5 = true;
}
// end if
}
// end if
if (reqArray[_loc2].objectType == "textarea") {
if (reqArray[_loc2].object.text == "") {
_loc5 = true;
}
// end if
}
// end if
if (_loc5 == true) {
/*var myTW = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {closeButton: true, title: _root.reqmessage, _width: _root.mainwidth, _height: 32, _x: 0, _y: _root.submity, color: 16711680});
windowListener = new Object();
windowListener.click = function (evt)
{
myTW.deletePopUp();
};
myTW.addEventListener("click", windowListener);*/
valid_txt._visible = true;
valid_txt.text = reqmessage;
return;
}
// end if
}// end of for
var _loc15 = new String(_root._url);
var _loc14 = new String();
_loc14 = _loc15.substr(0, 4);
if (_loc14 == "file") {
valid_txt._visible = true;
valid_txt.text = "local.html";
getURL("local.html");
return;
}
// end if
var _loc3 = new LoadVars();
_loc3.xmlfile = file;
if (!registered) {
_loc3.uR = "true";
}
// end if
for (var _loc2 = 0; _loc2<fieldArray.length; ++_loc2) {
_loc6 = new FormObject();
_loc6 = fieldArray[_loc2];
if (fieldArray[_loc2].objectType == "hidden") {
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].objectValue;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "textinput") {
if (_level0.fieldArray[_loc2].object.text == "") {
continue;
}
// end if
if (_level0.fieldArray[_loc2].object.emBx != undefined) {
_loc3.eM = _level0.fieldArray[_loc2].object.text;
}
// end if
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].object.text;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "textarea") {
if (_level0.fieldArray[_loc2].object.text == "") {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].object.text;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "checkbox") {
if (fieldArray[_loc2].object.selected == false) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName+" - "+fieldArray[_loc2].object.label] = fieldArray[_loc2].objectValue;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "radiobutton") {
if (fieldArray[_loc2].object.selected == false) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName+" - "+fieldArray[_loc2].object.label] = "Checked";
continue;
}
// end if
if (fieldArray[_loc2].objectType == "submitbutton") {
fieldArray[_loc2].object.label = "Submitting...";
fieldArray[_loc2].object.enabled = false;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "combobox") {
var _loc4 = fieldArray[_loc2].object.selectedItem;
if (_loc4.label == "") {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = _loc4.label;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "list") {
_loc4 = fieldArray[_loc2].object.selectedItem;
if (_loc4.label == undefined) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = _loc4.label;
continue;
}
// end if
}// end of for
// _loc3.send(_level0.submitURL, _level0.submitWindow, _level0.submitMethod);
valid_txt._visible = true;
valid_txt.text = "Thank you message";
_loc3.send(submitURL,submitWindow,submitMethod);
}// End of the function
function submitButtonKeyPress(eventObj) {
if (Key.getCode() == 13) {
submitButtonPress(eventObj);
}
// end if
}// End of the function
valid_txt._visible = false;
var registered = true;
var submitURL = "";
var submitWindow = "_self";
var submitMethod = "_POST";
var my_xml = new XML();
var fieldArray = new Array();
var reqArray = new Array();
var file;
var mainheight;
var mainwidth;
var reqmessage = "One or More Fields are Required";
var submity = 0;
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
var _loc4 = 1;
my_xml.parseXML(my_xml.toString());
var _loc8 = my_xml.firstChild;
if (_loc8.attributes.themecolor != undefined) {
_global.style.setStyle(_global.style.setStyle("themeColor", _loc8.attributes.themecolor));
}
// end if
if (_loc8.attributes.bordercapcolor != undefined) {
_global.style.setStyle(_global.style.setStyle("borderCapColor", _loc8.attributes.bordercapcolor));
}
// end if
if (_loc8.attributes.shadowcapcolor != undefined) {
_global.style.setStyle(_global.style.setStyle("shadowCapColor", _loc8.attributes.shadowcapcolor));
}
// end if
if (_loc8.attributes.bordercolor != undefined) {
_global.style.setStyle(_global.style.setStyle("borderColor", _loc8.attributes.bordercolor));
}
// end if
if (_loc8.attributes.shadowcolor != undefined) {
_global.style.setStyle(_global.style.setStyle("shadowColor", _loc8.attributes.shadowcolor));
}
// end if
if (_loc8.attributes.borderstyle != undefined) {
_global.style.setStyle(_global.style.setStyle("borderStyle", _loc8.attributes.borderstyle));
}
// end if
if (_loc8.attributes.highlightcolor != undefined) {
_global.style.setStyle(_global.style.setStyle("highlightColor", _loc8.attributes.highlightcolor));
}
// end if
if (_loc8.attributes.buttoncolor != undefined) {
_global.style.setStyle(_global.style.setStyle("buttonColor", _loc8.attributes.buttoncolor));
}
// end if
if (_loc8.attributes.fontcolor != undefined) {
_global.style.setStyle("color",_loc8.attributes.fontcolor);
}
// end if
if (_loc8.attributes.fontsize != undefined) {
_global.style.setStyle("fontSize",_loc8.attributes.fontsize);
}
// end if
if (_loc8.attributes.fontname != undefined) {
_global.style.setStyle("fontFamily",_loc8.attributes.fontname);
}
// end if
if (_loc8.attributes.url != undefined) {
submitURL = _loc8.attributes.url;
}
// end if
if (_loc8.attributes.method != undefined) {
submitMethod = _loc8.attributes.method;
}
// end if
if (_loc8.attributes.window != undefined) {
submitWindow = _loc8.attributes.window;
}
// end if
if (_loc8.attributes.reqmessage != undefined) {
reqmessage = _loc8.attributes.reqmessage;
}
// end if
if (_loc8.attributes.bkcolor != undefined) {
_root.beginFill(_loc8.attributes.bkcolor,100);
_root.moveTo(0,0);
_root.lineTo(_level0.w,0);
_root.lineTo(_level0.w,_level0.h);
_root.lineTo(0,_level0.h);
_root.lineTo(0,0);
_root.endFill();
}
// end if
if (_loc8.attributes.outlinecolor != undefined) {
_root.lineStyle(2,_loc8.attributes.outlinecolor,100);
_root.moveTo(0,0);
_root.lineTo(_level0.w,0);
_root.lineTo(_level0.w,_level0.h);
_root.lineTo(0,_level0.h);
_root.lineTo(0,0);
}
// end if
if (_loc8.attributes.width != undefined) {
mainwidth = _loc8.attributes.width;
}
// end if
if (_loc8.attributes.height != undefined) {
mainheight = _loc8.attributes.height;
}
// end if
for (var _loc3 = _loc8.firstChild; _loc3 != null; _loc3=_loc3.nextSibling) {
if (_loc3.nodeName == "submitbutton") {
if (_loc3.attributes.image != undefined) {
_root.createEmptyMovieClip("mc",_loc4);
_root.mc.createEmptyMovieClip("mc2",_loc4+1);
_root.image4._visible = true;
_root.mc._visible = true;
_root.mc.onRelease = function() {
submitButtonPress(eventObj);
};
_root.mc.mc2.loadMovie(_loc3.attributes.image);
if (_loc3.attributes.alpha != undefined) {
_root.mc._alpha = _loc3.attributes.alpha;
}
// end if
if (_loc3.attributes.x != undefined) {
_root.mc._x = _loc3.attributes.x;
}
// end if
if (_loc3.attributes.y != undefined) {
_root.mc._y = _loc3.attributes.y;
}
// end if
++_loc4;
++_loc4;
} else {
var _loc29 = new FormObject();
_loc29.objectType = "submitbutton";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
_loc29.object = createClassObject(mx.controls.Button, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, password:_loc3.attributes.password, label:_loc3.attributes.label});
_root.submity = _loc3.attributes.y;
trace(_root.submity);
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.fontsize != undefined) {
_loc29.object.fontSize = _loc3.attributes.fontsize;
}
// end if
_loc29.object.keyDown = submitButtonKeyPress;
_loc29.object.addEventListener("keyDown",form);
form = new Object();
form.click = submitButtonPress;
_loc29.object.addEventListener("click",form);
fieldArray.push(_loc29);
++_loc4;
}// end else if
continue;
}
// end if
if (_loc3.nodeName == "hidden") {
_loc29 = new FormObject();
_loc29.objectType = "hidden";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "textinput") {
if (_loc3.hasChildNodes) {
var _loc6 = _loc3.firstChild;
if (_loc6.nodeName == "label") {
_loc29 = new FormObject();
_loc29.objectType = "label";
_loc29.objectName = _loc6.attributes.name;
_loc29.objectValue = _loc6.attributes.value;
_loc29.object = createClassObject(mx.controls.Label, _loc6.attributes.name, _loc4, {_y:_loc6.attributes.y, _x:_loc6.attributes.x, text:_loc6.attributes.text, autoSize:true});
if (_loc6.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc6.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc6.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc6.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc6.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc6.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc6.attributes.fontsize != undefined) {
_loc29.object.fontSize = _loc6.attributes.fontsize;
}
// end if
if (_loc6.attributes.fontcolor != undefined) {
_loc29.object.color = _loc6.attributes.fontcolor;
}
// end if
++_loc4;
}
// end if
}
// end if
var _loc14 = 0;
if (_loc3.attributes.password == "true") {
_loc14 = 1;
}
// end if
_loc29 = new FormObject();
_loc29.objectType = "textinput";
_loc29.objectName = _loc3.attributes.name;
_loc29.object = createClassObject(mx.controls.TextInput, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, password:_loc14, maxChars:_loc3.attributes.maxchars, text:_loc3.attributes.initvalue, color:_loc3.attributes.fontcolor, backgroundColor:_loc3.attributes.bkcolor, emBx:_loc3.attributes.emailbox, editable:true});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
if (_loc3.attributes.required == "true") {
reqArray.push(_loc29);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "textarea") {
_loc14 = 0;
if (_loc3.attributes.password == "true") {
_loc14 = 1;
}
// end if
_loc29 = new FormObject();
_loc29.objectType = "textarea";
_loc29.objectName = _loc3.attributes.name;
_loc29.object = createClassObject(mx.controls.TextArea, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, password:_loc14, maxChars:_loc3.attributes.maxchars, text:_loc3.attributes.initvalue, wordWrap:_loc3.attributes.wordwrap, color:_loc3.attributes.fontcolor, backgroundColor:_loc3.attributes.bkcolor, editable:true});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
if (_loc3.attributes.required == "true") {
reqArray.push(_loc29);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "checkbox") {
_loc14 = 0;
if (_loc3.attributes.checked == "true") {
_loc14 = 1;
}
// end if
_loc29 = new FormObject();
_loc29.objectType = "checkbox";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
_loc29.object = createClassObject(mx.controls.CheckBox, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, label:_loc3.attributes.label, labelPlacement:_loc3.attributes.labelPos, selected:_loc14, color:_loc3.attributes.fontcolor});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.fontsize != undefined) {
_loc29.object.fontSize = _loc3.attributes.fontsize;
}
// end if
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "radiobutton") {
_loc14 = 0;
if (_loc3.attributes.checked == "true") {
_loc14 = 1;
}
// end if
_loc29 = new FormObject();
_loc29.objectType = "radiobutton";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
_loc29.object = createClassObject(mx.controls.RadioButton, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, label:_loc3.attributes.label, labelPlacement:_loc3.attributes.labelPos, groupName:_loc3.attributes.groupname, selected:_loc14, color:_loc3.attributes.fontcolor});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.fontsize != undefined) {
_loc29.object.fontSize = _loc3.attributes.fontsize;
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "combobox") {
var _loc9 = mx.controls.ComboBox;
_loc29 = new FormObject();
_loc29.objectType = "combobox";
_loc29.objectName = _loc3.attributes.name;
_loc9 = createClassObject(mx.controls.ComboBox, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, editable:false, color:_loc3.attributes.fontcolor, backgroundColor:_loc3.attributes.bkcolor});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.hasChildNodes=true) {
for (var _loc6 = _loc3.firstChild; _loc6 != null; _loc6=_loc6.nextSibling) {
_loc9.addItem(_loc6.attributes.name);
}// end of for
}
// end if
_loc9.openDuration = 50;
_loc29.object = _loc9;
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "list") {
_loc29 = new FormObject();
_loc29.objectType = "list";
_loc29.objectName = _loc3.attributes.name;
var _loc11 = mx.controls.List;
_loc11 = createClassObject(mx.controls.List, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, _width:_loc3.attributes.w, _height:_loc3.attributes.h, backgroundColor:_loc3.attributes.bkcolor, color:_loc3.attributes.fontcolor});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.hasChildNodes) {
for (var _loc6 = _loc3.firstChild; _loc6 != null; _loc6=_loc6.nextSibling) {
_loc11.addItem(_loc6.attributes.name);
}// end of for
}
// end if
_loc29.object = _loc11;
if (_loc3.attributes.focused == "true") {
_root.focusManager.setFocus(_loc29.object);
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "label") {
_loc29 = new FormObject();
_loc29.objectType = "label";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
_loc29.object = createClassObject(mx.controls.Label, _loc3.attributes.name, _loc4, {_y:_loc3.attributes.y, _x:_loc3.attributes.x, text:_loc3.attributes.text, autoSize:true});
if (_loc3.attributes.fontbold == "bold") {
_loc29.object.fontWeight = "bold";
}
// end if
if (_loc3.attributes.fontbold == "normal") {
_loc29.object.fontWeight = "normal";
}
// end if
if (_loc3.attributes.fontitalic == "italic") {
_loc29.object.fontStyle = "italic";
}
// end if
if (_loc3.attributes.fontitalic == "normal") {
_loc29.object.fontStyle = "normal";
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
if (_loc3.attributes.fontsize != undefined) {
_loc29.object.fontSize = _loc3.attributes.fontsize;
}
// end if
if (_loc3.attributes.fontcolor != undefined) {
_loc29.object.color = _loc3.attributes.fontcolor;
}
// end if
if (_loc3.attributes.fontname != undefined) {
_loc29.object.fontFamily = _loc3.attributes.fontname;
}
// end if
fieldArray.push(_loc29);
++_loc4;
continue;
}
// end if
if (_loc3.nodeName == "image") {
if (_loc3.attributes.image != undefined) {
ww = "image"+_loc4;
var _loc10 = MovieClip;
_loc10 = _root.createEmptyMovieClip(ww, _loc4);
++_loc4;
_loc10.loadMovie(_loc3.attributes.image);
if (_loc3.attributes.alpha != undefined) {
_loc10._alpha = _loc3.attributes.alpha;
}
// end if
if (_loc3.attributes.x != undefined) {
_loc10._x = _loc3.attributes.x;
}
// end if
if (_loc3.attributes.y != undefined) {
_loc10._y = _loc3.attributes.y;
}
// end if
}
// end if
}
// end if
if (_loc3.nodeName == "bkimage") {
if (_loc3.attributes.image != undefined) {
var _loc12 = 100;
var _loc13 = 100;
var _loc15 = "image"+_loc4;
_loc10 = MovieClip;
_loc10 = _root.createEmptyMovieClip(_loc15, _loc4);
_loc10.loadMovie(_loc3.attributes.image);
++_loc4;
if (_loc3.attributes.x != undefined) {
_loc10._x = _loc3.attributes.x;
}
// end if
if (_loc3.attributes.y != undefined) {
_loc10._y = _loc3.attributes.y;
}
// end if
if (_loc3.attributes.width != undefined) {
_loc12 = Number(_loc3.attributes.width);
}
// end if
if (_loc3.attributes.height != undefined) {
_loc13 = Number(_loc3.attributes.height);
}
// end if
for (y=0; y<_level0.h; y=y+_loc13) {
for (x=0; x<_level0.w; x=x+_loc12) {
var _loc7 = "image"+_loc4;
var _loc5 = MovieClip;
_loc5 = _root.createEmptyMovieClip(_loc7, _loc4);
_loc5.loadMovie(_loc3.attributes.image);
++_loc4;
_loc5._x = x;
_loc5._y = y;
}// end of for
}// end of for
}
// end if
}
// end if
}// end of for
} else {
_loc29 = new FormObject();
_loc29.objectType = "label";
_loc29.objectName = _loc3.attributes.name;
_loc29.objectValue = _loc3.attributes.value;
_loc29.object = createClassObject(mx.controls.Label, "broke", 1, {_y:0, _x:0, text:"Cannot find your XML file.\nYou need to upload it for\nthis form to work.", autoSize:true});
}// end else if
if (!registered) {
duplicateMovieClip(yellowbx1, "yellowbx2", _loc4);
yellowbx2._x = 0;
yellowbx2._y = mainheight-15;
++_loc4;
yellowbx2.onRelease = function() {
getURL("http://www.coffeecup.com");
};
duplicateMovieClip(CCUNREGBTN1, "CCUNREGBTN2", _loc4);
++_loc4;
CCUNREGBTN2._y = mainheight-17;
var _loc30 = (mainheight-CCUNREGBTN2._width)/2;
if (_loc30<0) {
_loc30 = 0;
}
// end if
CCUNREGBTN2._x = _loc30;
CCUNREGBTN2.onRelease = function() {
getURL("http://www.coffeecup.com");
};
}
// end if
yellowbx1.swapDepths(1000);
yellowbx1.removeMovieClip();
CCUNREGBTN1.swapDepths(1000);
CCUNREGBTN1.removeMovieClip();
};
if (_level0.xmlfile != undefined) {
file = _level0.xmlfile;
} else {
file = "refinance.xml";
}// end else if
my_xml.load(file);
I can provide the codes for the "Purchase" and "Loss Mitigation" forms if needed but I believe all 3 have the same problem...thanks again!
|
|
|
|
04-13-2009, 05:23 PM
|
Re: Having problems with mailscript for my flash site :(
|
Posts: 23
Name: sassss
|
Thanks you guys....hopefully what I have posted below will make it easier as it seems like it is the "core" of what I need and hopefully to which contains the error...thanks again !
Code:
function submitButtonPress(eventObj) {
var _loc5 = false;
for (var _loc2 = 0; _loc2<reqArray.length; ++_loc2) {
var _loc6 = new FormObject();
if (reqArray[_loc2].objectType == "textinput") {
if (reqArray[_loc2].object.text == "") {
_loc5 = true;
}
// end if
}
// end if
if (reqArray[_loc2].objectType == "textarea") {
if (reqArray[_loc2].object.text == "") {
_loc5 = true;
}
// end if
}
// end if
if (_loc5 == true) {
/*var myTW = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {closeButton: true, title: _root.reqmessage, _width: _root.mainwidth, _height: 32, _x: 0, _y: _root.submity, color: 16711680});
windowListener = new Object();
windowListener.click = function (evt)
{
myTW.deletePopUp();
};
myTW.addEventListener("click", windowListener);*/
valid_txt._visible = true;
valid_txt.text = reqmessage;
return;
}
// end if
}// end of for
var _loc15 = new String(_root._url);
var _loc14 = new String();
_loc14 = _loc15.substr(0, 4);
if (_loc14 == "file") {
valid_txt._visible = true;
valid_txt.text = "local.html";
getURL("local.html");
return;
}
// end if
var _loc3 = new LoadVars();
_loc3.xmlfile = file;
if (!registered) {
_loc3.uR = "true";
}
// end if
for (var _loc2 = 0; _loc2<fieldArray.length; ++_loc2) {
_loc6 = new FormObject();
_loc6 = fieldArray[_loc2];
if (fieldArray[_loc2].objectType == "hidden") {
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].objectValue;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "textinput") {
if (_level0.fieldArray[_loc2].object.text == "") {
continue;
}
// end if
if (_level0.fieldArray[_loc2].object.emBx != undefined) {
_loc3.eM = _level0.fieldArray[_loc2].object.text;
}
// end if
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].object.text;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "textarea") {
if (_level0.fieldArray[_loc2].object.text == "") {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = fieldArray[_loc2].object.text;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "checkbox") {
if (fieldArray[_loc2].object.selected == false) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName+" - "+fieldArray[_loc2].object.label] = fieldArray[_loc2].objectValue;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "radiobutton") {
if (fieldArray[_loc2].object.selected == false) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName+" - "+fieldArray[_loc2].object.label] = "Checked";
continue;
}
// end if
if (fieldArray[_loc2].objectType == "submitbutton") {
fieldArray[_loc2].object.label = "Submitting...";
fieldArray[_loc2].object.enabled = false;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "combobox") {
var _loc4 = fieldArray[_loc2].object.selectedItem;
if (_loc4.label == "") {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = _loc4.label;
continue;
}
// end if
if (fieldArray[_loc2].objectType == "list") {
_loc4 = fieldArray[_loc2].object.selectedItem;
if (_loc4.label == undefined) {
continue;
}
// end if
_loc3[fieldArray[_loc2].objectName] = _loc4.label;
continue;
}
// end if
}// end of for
// _loc3.send(_level0.submitURL, _level0.submitWindow, _level0.submitMethod);
valid_txt._visible = true;
valid_txt.text = "Thank you message";
_loc3.send(submitURL,submitWindow,submitMethod);
}// End of the function
|
|
|
|
|
« Reply to Having problems with mailscript for my flash site :(
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|