Well,, i somehow figure it out this way,, but is there a better way of doing it? thanks
sync on
sync rate 60
make object cube 1,1
delete object 1
do
text 0,0,"Click No. "+str$(click)+""
ink rgb(0,0,0),rgb(0,0,0)
box 15,100,44,120
ink rgb(0,0,255),rgb(0,0,0)
box 17,102,42,118
INK rgb(255,255,255),rgb(0,0,0)
if mousex()>15 and mousex()<35 and mousey()>100 and mousey()<120 AND MOUSECLICK()=1 and clicked=0
inc click,1
clicked=1
endif
if mouseclick()=0
clicked=0
endif
if click=1:text 17,104,"ON":endif
if click=2:text 17,104,"OFF":endif
if click=>3 then click=1
sync