the mouse

Ken Norris (dialup) pixelbird at interisland.net
Sun Mar 10 15:40:01 EST 2002


on 3/9/02 4:51 PM, Dar Scott at dsc at swcp.com wrote:

> 
> On Friday, March 8, 2002, at 02:13 PM, Ken Norris (dialup) wrote:
> 
>>> on mouseUp
>>> repeat for 60 times
>>> put the mouse into field "mouseValue"
>>> --put the mouseClick into field "mouseClickValue"
>>> wait for 500 milliseconds
>>> end repeat
>>> end mouseUp
>>> 
>>> During this 30 second test, when the mouse button is pressed the
>>> value of the field "mouseValue" changes to "down".  However, when
>>> it is released, it does not change to "up".
>> ----------
>> How can it? You have locked the first value into the loop until it
>> quits.
> 
> Could you clarify what you mean by this?
----------
on mouseUp -- sends the "up" message -once- to the object whenever the
      -- button is released, and takes priority for the object

  repeat 60 times -- begins a 60 cycle loop

    put the mouse into field "mouseValue" -- puts the very next state
      -- ('down', of course) of the mouse it catches in the loop into the
      -- field "mouseValue".
    
    -- put the mouseClick into field "mouseClickValue" -- commented line
      -- does nothing -- BUT, if you UNcomment this line it will put the
      -- up state, which is the last half of a mouseClick event message,
      -- into the field "mouseClickValue", but probably also sends it
      -- (mouseUp) to the object again

    wait 500 milliseconds -- stops _all_ messages for 500
      -- milliseconds

  end repeat
end mouseUp

You are trying to catch two different mouse messages in a mouse handler.
You're lucky it's not stalling out or giving you an error.

Best regards,
Ken N.
      
    




More information about the use-livecode mailing list