flash按钮上显示数据资料
在按钮点击的时候,让按钮上面显示出数据总条数;
我在按钮上做了一个层,放置一个text的文本的影片剪辑。
按钮:button;影片剪辑:text2;动态文本的变量:eee;
按钮的影片剪辑
on (release) {
System.useCodepage = true;
mainnews = new LoadVars();//注1
mainnews.load("http://localhost/B/Flash_total.asp");//注2
mainnews.onLoad = function(success) {//注3
if (success) {
var fornum=mainnews.fornum;
//for(var i=0; i<3;i++){
text1.eee = mainnews.total //注4
button.text2.eee = mainnews.total
//}
}else {
trace("fail");//注5
}
}
}
asp:
response.write("&total="&total)
把变量的赋值给一个普通的影片剪辑text1,没问题,就是按钮上的不显示;请高手指教。
注明:flash深度学习中