[COLOR=#808080]/************************************************************************
[/COLOR][COLOR=#808080]wlyxxzdm
简单翻页浏览信息(分条显示)
***************************************************************************/[/COLOR]
[COLOR=#808080]//==========flash.fla代码============[/COLOR]
import mx.controls.Alert
System.useCodepage = true;
i = 0;
bt_txt.autoSize = true;
id_txt.autoSize = true;
/*xianshi_txt.autoSize = true;*/
var LV_xianshi = new LoadVars();
LV_xianshi.load("ceshi.asp");
LV_xianshi.onLoad = function(chenggong) {
if (chenggong) { var total=this.total_asp var content_flash = this.content_asp.split("#"); var bt_flash = this.bt_asp.split("#"); var id_flash=this.id_asp.split("#") id_txt.htmlText=id_flash[total-1-i] content_txt.htmlText = content_flash[i]; bt_txt.htmlText = bt_flash[i]; btn_fy.onRelease = function() { i++; if (i>total-1) { i =total-1 ; showAlert("这已是最后一篇文章了!") } id_txt.htmlText=id_flash[total-1-i] bt_txt.htmlText = bt_flash[i]; content_txt.htmlText = content_flash[i]; }; s_btn.onRelease = function() { i--; if (i<0) { i = 0; showAlert("这已是第一篇文章了!") } id_txt.htmlText=id_flash[total-1-i] bt_txt.htmlText = bt_flash[i]; content_txt.htmlText = content_flash[i]; };
} else { content_txt.htmlText = "加载失败";
}
};
function showAlert(str:String){
Alert.yesLabel="确定"
Alert.noLabel="取消"
Alert.show(str,"提示",Alert.YES|Alert.NO)
}
[COLOR=#808080]//================xianshi.asp=============[/COLOR]
<!--#include file="conn.asp" -->
<%
'读取记录
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="Select * from shujubiao order by id desc"
rs.open sql,conn,1,3
Response.Write("&total_asp="&rs.recordcount)
dim id,content,user,bt,bt_shuchu,id_shuchu,content_shuchu,user_shuchu
do while not rs.eof
id=rs("id")
content=rs("content")
bt=rs("bt")
id_shuchu=id_shuchu&id&"#"
bt_shuchu=bt_shuchu&bt&"#"
content_shuchu=content_shuchu&content&"#"
rs.movenext
loop
'[COLOR=#808080]输出记录[/COLOR]
Response.Write("&bt_asp="&bt_shuchu&"&content_asp="&content_shuchu&"&id_asp="&id_shuchu)
'关闭连接
Closeconn()
%> |