Re: Determining left or right movement in a mouseMove handler

2017-06-27 Thread Michael Kristensen via use-livecode
Thank you Mike Bonner, Mark Schonewille and Alejandre Tejada. I did work in the direction of Mike and Marks script but I forgot to use Local. That solved it. Alejandro I did not dig deep into your stack as the solution was ready at hand from Mike and Mark. But you can always us a bezier script

Determining left or right movement in a mouseMove handler

2017-06-27 Thread Alejandro Tejada via use-livecode
Hi Michael, This stack (and many other published stacks) have scripts for tracking mouseX and mouseY within a mousemove handler: http://andregarzia.on-rev.com/alejandro/stacks/newPentoolScript_v02.zip Al ___ use-livecode mailing list use-livecode@lists

Re: Determining left or right movement in a mouseMove handler

2017-06-27 Thread Mark Schonewille via use-livecode
Hoping I didn't mix up the x's and y's, I believe the script you need looks like this: local myOldX,myOldY on mouseMove theNewX,theNewY if myOldX < theNewX then put "right" into myMovement else put "left" into myMoveMent end if if myOldY > myNewY then put "down" into myMoveMe

Re: Determining left or right movement in a mouseMove handler

2017-06-27 Thread Mike Bonner via use-livecode
You do need to track the last location... here is a stack that does what you want. (script could be better i'm sure, but its a starting point.. ) https://www.dropbox.com/s/y6du5nmz5diiv0f/movedir.livecode?dl=0 Basically I put 4 square graphics on screen, top, bottom, right, and left position. T

Determining left or right movement in a mouseMove handler

2017-06-27 Thread Michael Kristensen via use-livecode
Hi there How can I determine if the mouse is moving left or right (or up or down) on the screen in a mouseMove handler? Not just from the outset (that is easy) but at any moment, like when a user changes his mind and move the opposite way. Something like put x into oldX will not work. Thanks