Re: side effect on mac with LC
On Tue, Jan 17, 2017 at 2:44 PM, Yves COPPE via use-livecode < use-livecode@lists.runrev.com> wrote: > Sorry, but your answer is not enough clear to help me… > can you explain more with a more developed sample > Not without writing one from scratch; that one is pretty much out of my own code line for line. You need to save where the position *was,* possibly as a custom property of the slider. When the mouse moves, see where it *is.*If that has changed, then "doSomething"--display or move your red dot to the x-coordenate of the mouseLoc, or whatever you want to happen. Come to think of it, I thought there were scrollbar specific messages (scrollbarDrag ?), but I don't see them in the dictionary, other than scrollbarPageInc. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
Re: side effect on mac with LC
Hi, I will try it tomorrow Thank you Greetings. Yves COPPE yvesco...@mac.com What you can do is the following: When the user pushes down you register the horisontal position of the pointer and store this position for later use. This can be stored in a variabel or a custom property like this: global gStartH on mouseDown put the mouseH into gStartH end mouseDown //You then control whether the pointer has been moved or not in a mouseUp handler, decide how far it should move before you slide on mouseUp if the mouseH > (gStartH + 100) then //has moved more than 100 pixels lock screen for visual effect go next card unlock screen with visual effect push right fast end if if the mouseH < (gStartH-100) then //has moved more than 100 pixels lock screen for visual effect go previous card unlock screen with visual effect push left fast end if end mouseUp If you like you can check while the mouse is moving with the following script (in stead of mouseUp): on mouseMove if the mouse is down and the mouseH > (gStartH + 100) then //has moved more than 100 pixels lock screen for visual effect go next card unlock screen with visual effect push right fast end if if the mouse is down and the mouseH < (gStart -100) then //has moved more than 100 pixels lock screen for visual effect go previous card unlock screen with visual effect push left fast end if end mouseMove If you put this script in the stack, you need to make sure that the card or other objects do not trap the mouse messages. Regards Tore Nilsen ___ 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
Re: side effect on mac with LC
What you can do is the following: When the user pushes down you register the horisontal position of the pointer and store this position for later use. This can be stored in a variabel or a custom property like this: global gStartH on mouseDown put the mouseH into gStartH end mouseDown //You then control whether the pointer has been moved or not in a mouseUp handler, decide how far it should move before you slide on mouseUp if the mouseH > (gStartH + 100) then //has moved more than 100 pixels lock screen for visual effect go next card unlock screen with visual effect push right fast end if if the mouseH < (gStartH-100) then //has moved more than 100 pixels lock screen for visual effect go previous card unlock screen with visual effect push left fast end if end mouseUp If you like you can check while the mouse is moving with the following script (in stead of mouseUp): on mouseMove if the mouse is down and the mouseH > (gStartH + 100) then //has moved more than 100 pixels lock screen for visual effect go next card unlock screen with visual effect push right fast end if if the mouse is down and the mouseH < (gStart -100) then //has moved more than 100 pixels lock screen for visual effect go previous card unlock screen with visual effect push left fast end if end mouseMove If you put this script in the stack, you need to make sure that the card or other objects do not trap the mouse messages. Regards Tore Nilsen > 17. jan. 2017 kl. 23.44 skrev Yves COPPE via use-livecode >: > > Hi, > > Sorry, but your answer is not enough clear to help me… > can you explain more with a more developed sample ? > > > > > If you mean what I think you mean, you can use "on mouseMove": > > on mouseup > > if the thumbpos of me <> the savedThumPos of this stack then > > --it changed > > doSomething > > end if > > set the savedThumPos of me to the thumbPos of me > > end mouseup > > Thanks. > > Greetings. > > Yves COPPE > ___ > 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 ___ 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
Re: side effect on mac with LC
Hi, Sorry, but your answer is not enough clear to help me… can you explain more with a more developed sample ? If you mean what I think you mean, you can use "on mouseMove": on mouseup if the thumbpos of me <> the savedThumPos of this stack then --it changed doSomething end if set the savedThumPos of me to the thumbPos of me end mouseup Thanks. Greetings. Yves COPPE ___ 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
Re: side effect on mac with LC
On Tue, Jan 17, 2017 at 12:42 PM, Yves COPPE via use-livecode < use-livecode@lists.runrev.com> wrote: > Is it possible with LC to have a sliding on side effect when moving > horizontally the finger on the mouse as to let appear a « red btn » > underneath another on front with label for example « Remove » ? If you mean what I think you mean, you can use "on mouseMove": on mouseup if the thumbpos of me <> the savedThumPos of this stack then --it changed doSomething end if set the savedThumPos of me to the thumbPos of me end mouseup (you might need to set the new value before doSomething if that takes a moment and the thumbPos could change while it happens. I like it where it is so that it isn't set if the script bombs. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ 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
side effect on mac with LC
Hi list, I’d like to make an effect typically for mobile on a mac Is it possible with LC to have a sliding on side effect when moving horizontally the finger on the mouse as to let appear a « red btn » underneath another on front with label for example « Remove » ? You can see that on the notes.app or mail.app ... If someone hs a sample script therefore ?? Thanks. Greetings. Yves COPPE yvesco...@mac.com ___ 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