flash+asp 提交保存数据到文本文件代码
flash+asp教程 提交保存数据到文本文件代码
asp 接受由flash提交的变量message的值提交到asp写入文件中哦。原理等吧。
as代码
ok.ok.onRelease = function ()
{
if (x_bt.text != "" & x_wz.text != "")
{
showtime();
ms = "|" + timer + " " + x_bt.text + "@" + x_wz.text;txtload = new LoadVars();
txtload.message = ms; er_tx.text=ms;
txtload.sendAndLoad("notes/yz_write.asp", txtload, "post");
txtload.onData = function (str)
{
if (str == "ok")
{
_parent.main.bt_btn.removeMovieClip();
_parent.main.xian1._visible = 0;
_parent.main.xian2._visible = 0;
_parent.alpha_load(_root.fenye.xie_mc, 0);
_parent.main.bt_txt_load();
_root.fh_btn_wz(1);
x_bt.text = "";
x_wz.text = "";er_tx.text="提交成功!";
}
else
{
er_tx.text="连接网络出错,请刷新。";
x_bt.text = "";
x_wz.text = "";
} // end else if
};
} // end if
};
asp保存代码
<%
Dim FSO,path,text,asp_ms
Set FSO=Server.CreateObject("Scripting.FileSystemobject")path=Server.MapPath("pl_read.asp")
asp_ms=Request.Form("message")
Set text=FSO.CreateTextFile(path,8)
text.WriteLine (asp_ms)
text.closeSet FSO=nothing
Response.Write("ok")
%>
补充:flash教程,动画技术