空间广告
在线情况
楼主
  • 头像
  • 级别
  • 门派
  • 职务总版主
  • 财富1
  • 积分634
  • 经验17284
  • 文章441
  • 注册2008-05-18
flash读取asp的简单例子
[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()
%>
风之帝国校务管理系统
loading...
loading...
loading...
loading...
loading...
loading...
loading...
回复帖子 注意: *为必填项
*验证信息 用户名 密码 注册新用户
*帖子名称
内容(最大50K)




其它选项 Alt+S快速提交
 


Powered by LeadBBS 9.1 licence.
Page created in 0.0635 seconds with 2 queries.