XY

Tereza Snyder tereza at attainmentcompany.com
Fri Jan 25 14:59:00 EST 2002


on 01.25.02 01:19PM, Nelson Zink wrote:

> Tereza,
> 
>> To avoid bottling up the engine servicing your loop:
>> 
>> on mouseMove mX, mY
>> put format( "horz: %d  vert: %d", mX, mY )
>> end mouseMove 
>> 
>> Scott Raney has told us in the past that "repeat until the mouseClick" is
>> not a good idea because it bolixes up the event handling in the engine. I've
>> found that mouseMove works wonderfully in situations where you'd be tempted
>> to use "repeat until the mouse is up" or similar loops.
> 
> While mousemove seems straight forward, how would one go about turning it on
> and off as might be needed in the "XY function"?
> 

something like: (NOT A REAL SCRIPT)

LOCAL tXY = false

on XY
    put true into tXY
end XY

on mouseMove mX,mY
   if tXY then
     if the mouse is down then
       put false into tXY
     else 
        --  do XY stuff
    end if
end mouseMove


another way: on XY, insert a script containing the code temporarily into the
front, and remove it on mouseup



+ Tereza Snyder 
+ Senior Software Developer
+ Attainment Company, Inc.
+ <www.attainmentcompany.com>
+ 800.327.4269




More information about the metacard mailing list