On 25/7/99 10:34 am Claude Lemmel <[EMAIL PROTECTED]> wrote:

>As other people on this list i had problems with "idle" or 
>"mouseStilldown" or
>in Metacard.
>We were explained that we have to use instead "send ..."
>
>But i can not imagine how to use "send" in some straight cases.
>
>I often need that something happens repeatedly as long as the user press a
>button.
>
>Suppose a locked field used as a counter
>
>
>on mousedown b
>  repeat while the mouse is "down"
>    if b = 1 then
>      add 1 to me
>    else
>      subtract 1 from me
>    end if
>  end repeat
>end mousedown

on mouseDown
  send "checkMouse" to me
end mouseDown

on checkMouse
  --do stuff here
  if the mouse is "up" then exit checkMouse
  if "checkMouse" is not in the pendingMessages then send "checkMouse" to 
me in 10 milliseconds
end checkMouse

>or
>
>on mousestilldown
>  if mouse(1) = "down" then
>    add 1 to me
>  else
>    subtract 1 from me
>  end if
>end mousestilldown

There is a complete article on this subject on our web site.  
http://www.xworlds.com/metacard then navigate to MetaClass on the left 
and select the article on using send.

Regards,

Kevin

Kevin Miller <[EMAIL PROTECTED]> <http://www.xworlds.com/>
Cross Worlds Computing, MetaCard Distributors, Custom Development.
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.

Reply via email to