productshow.asp代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
Set rs = Server.CreateObject("adodb.recordset")
sql="select top 4 * from Product order by productid desc"
rs.open sql,conn,1,1
response.Write("&Nproduct=")
i=1
Do While not rs.eof and i<=4
Response.Write(rs("productpic")&"|")
rs.movenext
i=i+1
Loop
Response.Write("pflag1=3")
rs.close
set rs=Nothing
%>
AS代码:
System.useCodepage=true;
var lv_img=new LoadVars();
lv_img.load("productshow.asp"); //载入文本信息文件
_global.img_array=new Array();
lv_img.onLoad=function(success){
if(success){
trace("载入成功!");
img_array=this.Nproduct.split("|");
image1.loadMovie(img_array[0]);
image2.loadMovie(img_array[1]);
image3.loadMovie(img_array[2]);
image4.loadMovie(img_array[3]);
}else{
trace("信息载入失败!");
gotoAndPlay(1);
}
}