no mouseup message passed
Posted: Wed Aug 05, 2009 2:37 pm
I'm building a very simple little program for language learning called a "cloze." In it I ask the user to drag and drop a button into a sentence that has a blank. The button has the script :
on mousedown
repeat while the mouse is down
set the loc of card button "dragndrop" to the mouseloc
end repeat
end mousedown
on mouseup
if the loc of me is within the rectangle of field "dropsite"
then
answer "You've got it!" with "Close me."
exit mouseup
else set the loc of me to 10,30
end mouseup
It sometimes resets the button to the right loc and sometimes not. So I opened the message watcher, and saw that sometimes mouseup doesn't appear. Why is that? I've searched the forum and didn't find an answer (at least not one I could apply to my simple situation):
the field is not locked and it's in the background (or second level)
Thanks in advance
new (exam copy) user
roeg11
on mousedown
repeat while the mouse is down
set the loc of card button "dragndrop" to the mouseloc
end repeat
end mousedown
on mouseup
if the loc of me is within the rectangle of field "dropsite"
then
answer "You've got it!" with "Close me."
exit mouseup
else set the loc of me to 10,30
end mouseup
It sometimes resets the button to the right loc and sometimes not. So I opened the message watcher, and saw that sometimes mouseup doesn't appear. Why is that? I've searched the forum and didn't find an answer (at least not one I could apply to my simple situation):
the field is not locked and it's in the background (or second level)
Thanks in advance
new (exam copy) user
roeg11