you code won't work because it'll only wait 1 second plus there isn't a if image clicked anyways heres my method that uses sprite collision.
steps:
1.first put sync on and sync rate and stuff
2.make your buttons and make a custom mouse
3.load all you images e.g.
load image "button1.bmp",1
load iamge "button2.bmp",2
and so on
4.then you need a loop
5.make sprites in your loop and place the mouse sprite last
do
`button 1
sprite 1,250,250,`button 1 image
`button 2
sprite 2,250,350,`button 2 image
`mouse
sprite 3,mousex(),mousey(),`mouse image
sync
cls
loop
6. set up sprite collision
do
`button 1
sprite 1,250,250,`button 1 image
`button 2
sprite 2,250,350,`button 2 image
`mouse
sprite 3,mousex(),mousey(),`mouse image
if sprite collision(3,1) and mouseclick()=1
`you code
endif
if sprite collision(3,2) and mouseclick()=2
`your code
endif
sync
cls
loop
when done it should look something like this
sync on : sync rate 60
hide mouse
`load all you images here
load image "button1.bmp",1
load image "button2.bmp",2
load image "mouse.bmp",3
do
sprite 1,250,250,1
sprite 2,250,350,2
sprite 3,mousex(),mousey(),3
if sprite collsion(3,1) and mouseclick()=1
print "Isn't this fun?"
endif
if sprite collision(3,2) and mouseclick()=1
print "See how it works?"
endif
sync
cls
loop
and thats all to it
Note:you can add scale sprite to it when the mouse sprite is over it to make the sprite bigger this doesn't do anything but does make it look cooler also if you want perfect pixel collision I recommend windowskillers ultmate collision which can be found
here