主题:  帮帮忙?关于统计调用数据库问题

zhq011

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2003/1/16 16:39:15
#12003/3/19 17:16:45
各位大虾,小弟现有一头疼问题:需要统计触摸屏每个按钮点击次数。求各位大侠帮帮忙。



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#22003/3/19 18:34:29
我意思的写了个行为
global bottonlist
property num,nameList
on beginsprite me
if voidp(bottonlist) then--建立bottonlist列表
bottonlist=[:]
end if
if findpos(bottonlist,me.name)=0 then
num=0
setaProp bottonlist value("#"&me.name),0
else
num=bottonlist[me.name]
end if
end

on mousedown me--计数
num=num+1
setaProp bottonlist value("#"&me.name), num
end

on getPropertyDescriptionList --给按钮命名
nameList=[:]
setaProp nameList #name, [#comment: "id", #format:#string]
return nameList
end getPropertyDescriptionList
最后通过bottonlist来得到计数,具体的情况可以根据你的情况而定,要写全判断又复杂了



zhq011

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2003/1/16 16:39:15
#32003/3/20 11:23:14
谢谢了!



zhq011

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2003/1/16 16:39:15
#42003/3/20 11:25:33
所有的按钮都要统计,这样可能有点麻烦,但是还是非常感谢!



zhq011

职务:普通成员
等级:1
金币:0.0
发贴:10
注册:2003/1/16 16:39:15
#52003/3/20 11:28:16
有没有直接递交到Access数据库的方法。谢谢!