asp
先在ASP里面定义分页,定义图片,接着
ASP部分
接连数据库我就不写,比如有一个表table里面有字段,id,title,content,image,date
ASP source code
<%
dim p'这个P可以是网页传过来的,也可以是FLASH传过来的
p=trim(request("p"))
if len(p)=0 then
p=1
end if
if isnumeric(p)=false then
p=1
end if
if p>32590 then
p=1
end if
p=cint(p)
set rs=server.createobject("adodb.recordset")
sql="select * from table order by date desc"
rs.open sql.....
if rs.eof then
response.write"read=errors"
else
const pm=20
rs.pagesize=pm
tr=rs.recordcount
tp=rs.recordpage
if p>tp then p=tp
rs.absolutepage=p
i=0
do while not rs.eof
i=i+i
title=rs("title")
image=rs("content")
response.write"title"&i&"="&title&"&image"&i&"="&image&""
rs.movenext
loop
response.write"i="&i&"&p="&p&""
end if
%>
flash开工了
第一真AS
stop();
Stage.showmenu=false;
System.useCodepage=true;
var p=1;
第二真;
stop;
var myload=new LoadVars();
myload.onload=function(su){
if(su!=undefined){
i=su.i;
p=su.p
nextFrame();
}else{
trace("data read failed");
}
}
myload.load("/.asp?p="+p);
第三真AS
stop();
for(j=0;j<i;j++){
this.createEmptyMovieClip("btnmc"+j,this.getNextHighestDepth());
temp=this["btnmc"+i];
坐标和大小你自己写吧;
..
}
for(k=0;k<i;k++){
this.createEmptyMovieClip("loadmc"+k,this.getNextHighestDepth());
tempimage=this["loadmc"+k];
tempimage.load("/path/"+image+k);
....
continue const x,y
..
loading bar
tempimage.onEnterFrame=function(){..
}
}
nextBtn.onPress=function(){
p=p-(-1);
this.gotoAndPlay(1);
nextBtn.enabled=false;
preBtn.enabled=false;
}
preBtn.onPress=function(){
..
}
大概思路是这样的,我没有写完,只是随便想的,你慢慢弄哦,需要帮助电邮给我unixpeter@hotmail.com(我能帮就帮)