At 12:53 PM -0700 22/7/1999, Karl Becker wrote:
>like it did in HC when I directly imported the stack into MC. I just
>opened the script and looked at it, and I'm wondering if MetaCard just
>lets mouseDown/mouseUp/etc messages go thru to whatever object the mouse
>is above, even when a script is happening, since this was the case. The
>bobber would do some stuff, and if you clicked (it had a little "if the
>mouse is down then play "whoa" " line in the script) , it wouldn't pick
>up the click. When the script was done, however, it sometimes would send
>a mouseUp message to the button the cursor was directly under, even if
>the user didn't click since the script ended. I'm not sure how well I'm
>explaining this... Well, I figured out a workaround to my problems in the
>casino game, but the basketball game will still have to be tackled... and
>heck, maybe C would be better to do that in, even...
This sounds similar to a problem Simon Lord posted some time ago. In
that case, following a mouseDown in one button, the subsequent
mouseUp went to a different button if the pointer happened to be over
it when released. I don't remember the details too well, but I think
the problem was caused by a "repeat until the mouse is up" statement
in the mouseDown handler. It was possible to solve the problem with
either a mouseMove handler or a "send ... in" message.
In general, mouseMove and "send ... in", apart from avoiding the
above problem, are more flexible and give you greater control than a
"wait/repeat until the mouse is up" which holds everything up.
To achieve a similar result as the "repeat until the mouse is up"
statement, something like this will do.
on mouseDown
<some stuff here>
send "doCleverStuff" to me in 10 milliseconds
<some more stuff here>
end mouseDown
on doCleverStuff
if the mouse is down then
<do something>
send "doCleverStuff" to me in 10 milliseconds
end if
end doCleverStuff
Cheers
Dave Cragg
_____________________________________________
The LACS Centre (Business English Training Resources)
mailto:[EMAIL PROTECTED]
http://www.lacscentre.co.uk
_____________________________________________