我意思的写了个行为
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来得到计数,具体的情况可以根据你的情况而定,要写全判断又复杂了