home *** CD-ROM | disk | FTP | other *** search
Wrap
namecreater = "MyPlayCity.com"; _root.name_txt.text = namecreater; LoadVars.prototype.clear = function() { for(element in this) { if(typeof this[element] != "function") { delete this[element]; } } }; setStatus = function(statusText) { _root.status_txt.text = statusText; }; getStatus = function() { return status_txt.text; }; setFocusHandler = function() { setStatus(this.statusText); this.backgroundColor = 16777215; }; killFocusHandler = function() { setStatus(""); this.backgroundColor = 13291221; }; changedHandler = function() { var _loc2_ = true; var _loc3_ = false; _loc3_ = true; if(_root.name_txt.length == 0 || _root.email_txt.length == 0 || _root.email1_txt.length == 0 && _root.email2_txt.length == 0 && _root.email3_txt.length == 0) { _loc2_ = false; } if(_loc2_) { submitBtn.enable(); } else { submitBtn.disable(); } if(_loc3_) { resetBtn.enable(); } else { resetBtn.disable(); } }; enableForm = function() { var _loc2_ = 0; while(_loc2_ < textFields.length) { _root[textFields[_loc2_]].selectable = true; _root[textFields[_loc2_]].border = true; _loc2_ = _loc2_ + 1; } submitBtn.enable(); resetBtn.enable(); cancelBtn.enable(); }; disableForm = function() { var _loc2_ = 0; while(_loc2_ < textFields.length) { _root[textFields[_loc2_]].selectable = false; _root[textFields[_loc2_]].border = false; _loc2_ = _loc2_ + 1; } submitBtn.disable(); resetBtn.disable(); cancelBtn.disable(); }; resetForm = function() { setStatus(""); _global.oldStatusText = ""; var _loc3_ = 0; while(_loc3_ < textFields.length) { _root[textFields[_loc3_]].selectable = true; _root[textFields[_loc3_]].border = true; if(_root[textFields[_loc3_]]._name != "subject_txt") { _root[textFields[_loc3_]].text = ""; } if(_root[textFields[_loc3_]]._name == "name_txt") { _root[textFields[_loc3_]].text = namecreater; } _loc3_ = _loc3_ + 1; } resetBtn.disable(); submitBtn.disable(); }; submitForm = function() { disableForm(); dataHandler.clear(); var _loc2_ = 0; while(_loc2_ < textFields.length) { if(_loc2_ != textFields.length - 1) { dataHandler[textFields[_loc2_]] = _root[textFields[_loc2_]].text; } else { var _loc3_ = new String(_root._url); dataHandler[textFields[_loc2_]] = "http://www.myplaycity.com/online_games/online_need_for_extreme.html"; } _loc2_ = _loc2_ + 1; } dataHandler.sendAndLoad("http://www.myplaycity.com/online_games/mailer.php",dataHandler,"POST"); setStatus("Contacting server...please wait!"); }; cancelForm = function() { gotoAndStop("begin"); }; messageBox = function(message) { setStatus(""); _global.oldStatusText = ""; var _loc7_ = 200; var _loc4_ = _root.createEmptyMovieClip("msgBox_mc",0); _loc4_.createTextField("body_txt",1,5,5,_loc7_ - 10,10); _loc4_.body_txt.multiline = true; _loc4_.body_txt.autoSize = true; _loc4_.body_txt.wordWrap = true; _loc4_.body_txt.selectable = false; _loc4_.body_txt.textColor = 6776679; _loc4_.body_txt.text = message; var _loc8_ = new TextFormat(); _loc8_.align = "center"; _loc8_.font = "_sans"; _loc8_.size = 12; _loc4_.body_txt.setTextFormat(_loc8_); var _loc6_ = _loc4_.body_txt.textHeight + 10; var _loc5_ = _loc4_.attachMovie("FSimpleButton","closeBtn",0); _loc5_._x = (_loc7_ - _loc5_._width) / 2; _loc5_._y = _loc6_; _loc5_.captionText = "Ok"; _loc5_.showHand = false; _loc5_.captionColor = 6776681; _loc5_.init(); _loc5_.onRelease = function() { enableForm(); this._parent.removeMovieClip(); }; _loc6_ += _loc5_._height + 5; _loc4_._x = (Stage.width - _loc7_) / 2; _loc4_._y = (Stage.height - _loc6_) / 2; _loc4_.moveTo(0,_loc6_); _loc4_.lineStyle(1,16119544,100); _loc4_.beginFill(15461616,100); _loc4_.lineTo(0,0); _loc4_.lineTo(_loc7_,0); _loc4_.lineStyle(1,12763844,100); _loc4_.lineTo(_loc7_,_loc6_); _loc4_.lineTo(0,_loc6_); _loc4_.endFill(); }; dataHandler = new LoadVars(); dataHandler.onLoad = function(success) { messageBox("Thank you!"); }; textFields = ["name_txt","email_txt","subject_txt","email1_txt","email2_txt","email3_txt","link_txt"]; statusStrings = ["Enter your name here","You should enter your email address here","This is the subject of your email","You should enter friend\'s email address here","You should enter friend\'s email address here","You should enter friend\'s email address here"]; count = 0; while(count < textFields.length - 1) { textField_txt = this[textFields[count]]; textField_txt.border = true; textField_txt.borderColor = 11645361; textField_txt.background = true; textField_txt.backgroundColor = 13291221; textField_txt.onSetFocus = setFocusHandler; textField_txt.onKillFocus = killFocusHandler; textField_txt.onChanged = changedHandler; textField_txt.statusText = statusStrings[count]; count++; } changedHandler(); stop();