reply.as2

var nickname; var emailinput; var replyinput; var recentreplies; replyalert.text = ""; stop (); replyalert.setStyle("color", 16711680); submitBtn.onPress = function () { trace ("Mouse clicked"); submitBtn.enabled = false; nickname = nickName.text; emailinput = email.text; replyinput = reply.text; if (nickname == "") { nickname = "匿名"; } // end if if (emailinput == "") { emailinput = "[email protected]"; } // end if if (replyinput == "") { replyalert.text = "请输入评论"; } else { replyalert.setStyle("color", 65280); replyalert.text = "发送中..."; var variables = new LoadVars(); variables.nickname = nickname; variables.email = emailinput; variables.body = replyinput; variables.magzineid = "11"; trace (variables); variables.sendAndLoad("http://www.hiotk.com/replies/add", variables, "POST"); variables.onLoad = function (success) { if (success) { trace (unescape(variables.toString()).split("&")[0]); recentreplies = unescape(variables.toString()).split("&")[0]; replyalert.text = "发送完毕."; gotoAndstop(2); } else { submitBtn.enabled = true; trace ("Error loading file"); } // end else if }; } // end else if };


replycontent.text = recentreplies;

你可能感兴趣的:(reply.as2)