richmond, are you asking a question or giving us code snippet to use? On Sun, Oct 15, 2017 at 1:01 PM, Richmond Mathewson via use-livecode < use-livecode@lists.runrev.com> wrote:
> Imagine a stack with a picture of an orange in its centre . . . > > The picture: img "arancia", contains the following script: > > on mouseDown > grab me > end mouseDown > > so the end-user can move the picture wherever they want > all over the stack. > > HOWEVER . . . I want to know whether their initial movement is to the > left, right, upwards or downwards. > > Fantasy time again [pseudocode]: > > on Grab > put the left of me into LEFT1 > put the top of me into TOP1 > wait 2 ticks > put the left of me into LEFT2 > put the top of me into TOP2 > if LEFT2 < LEFT1 then > put "LEFT" > else > put "RIGHT" > end if > if TOP2 < TOP1 then > put "UP" > else > put "DOWN" > end if > end Grab > > Richmond. > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://post.spmailt.com/f/a/3dHp0NbbW6l-hhVAqUqAVQ~~/AAGp3AA~/RgRbxMirP0EIACzw8z9Dj9ZXA3NwY1gEAAAAAFkGc2hhcmVkYQdoZWxsb18xYAw1Mi4zOS4yNi4xNDRCCgAAK5XjWWizsdtSHXVzZS1saXZlY29kZUBsaXN0cy5ydW5yZXYuY29tCVEEAAAAAEQ1aHR0cDovL2xpc3RzLnJ1bnJldi5jb20vbWFpbG1hbi9saXN0aW5mby91c2UtbGl2ZWNvZGVHAnt9 > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode