Re: slide with multiples of x?
Here's another similar wee snippet. on mouseUp set the thumbPos of me to round(the thumbPos of me / 20) * 20 end mouseUp :-) Jim Ault wrote: Same result, just a little bit shorter and one less handler, but probably the same speed. on mouseUp get the thumbposition of me set the thumbposition of me to ((it div 20)+( it mod 20 div 10))*20 AdjustLabelPosition end mouseUp You can do a quick test by pasting the following lines in the multi-line message box and hitting the enter key put empty into msg repeat with x = 1 to 109 get ((x div 20)+( x mod 20 div 10))*20 put msg &cr & x && it into msg end repeat and now your msg box is filled with 110 lines of results If you don't like the hard coded numbers try something like put 100/5 into incrm put ((it div incrm)+( it mod incrm div (incrm/2)))*incrm I implemented my own scrollbar value indicator that I move.Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. It runs on a Mac just fine. Jim Ault Las Vegas On 12/5/06 1:35 PM, "Peter T. Evensen" <[EMAIL PROTECTED]> wrote: Hi Eric, Thanks for the pointer. The one key I was missing is scrollbarDrag. I didn't know about that message. I implemented my own scrollbar value indicator that I move.Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. I'll have to think to see if I can come up with anything better. on mouseUp set the thumbposition of me to NearestThumbPos(the thumbposition of me) AdjustLabelPosition end mouseUp on scrollbarDrag lock screen AdjustLabelPosition unlock screen end scrollbarDrag function NearestThumbPos pPos put pPos div 20 into tNumTwenties put pPos mod 20 into tRemainder if tRemainder >= 10 then add 1 to tNumTwenties end if return 20 * tNumTwenties end NearestThumbPos on AdjustLabelPosition put the thumbposition of me into tPos put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" put (the width of me - 12) / the endValue of me into tPixelsPerValue put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc put the loc of field "Thumb Pos" into tFieldLoc put tThumbLoc into item 1 of tFieldLoc set the loc of field "Thumb Pos" to tFieldLoc end AdjustLabelPosition At 02:46 PM 12/5/2006, you wrote: Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Same result, just a little bit shorter and one less handler, but probably the same speed. > on mouseUp get the thumbposition of me set the thumbposition of me to ((it div 20)+( it mod 20 div 10))*20 >AdjustLabelPosition > end mouseUp You can do a quick test by pasting the following lines in the multi-line message box and hitting the enter key put empty into msg repeat with x = 1 to 109 get ((x div 20)+( x mod 20 div 10))*20 put msg &cr & x && it into msg end repeat and now your msg box is filled with 110 lines of results If you don't like the hard coded numbers try something like put 100/5 into incrm put ((it div incrm)+( it mod incrm div (incrm/2)))*incrm > I implemented my own scrollbar value indicator that I move.Here's what > I wound up with in my script. I haven't tried this on the Mac yet. I > don't like the hard-coded numbers; the might not work on the Mac. It runs on a Mac just fine. Jim Ault Las Vegas On 12/5/06 1:35 PM, "Peter T. Evensen" <[EMAIL PROTECTED]> wrote: > Hi Eric, > > Thanks for the pointer. The one key I was missing is scrollbarDrag. I > didn't know about that message. > > I implemented my own scrollbar value indicator that I move.Here's what > I wound up with in my script. I haven't tried this on the Mac yet. I > don't like the hard-coded numbers; the might not work on the Mac. I'll > have to think to see if I can come up with anything better. > > on mouseUp >set the thumbposition of me to NearestThumbPos(the thumbposition of me) >AdjustLabelPosition > end mouseUp > > on scrollbarDrag >lock screen >AdjustLabelPosition >unlock screen > end scrollbarDrag > > function NearestThumbPos pPos >put pPos div 20 into tNumTwenties >put pPos mod 20 into tRemainder >if tRemainder >= 10 then > add 1 to tNumTwenties >end if >return 20 * tNumTwenties > end NearestThumbPos > > on AdjustLabelPosition >put the thumbposition of me into tPos >put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" >put (the width of me - 12) / the endValue of me into tPixelsPerValue >put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc >put the loc of field "Thumb Pos" into tFieldLoc >put tThumbLoc into item 1 of tFieldLoc >set the loc of field "Thumb Pos" to tFieldLoc > end AdjustLabelPosition > > > At 02:46 PM 12/5/2006, you wrote: >> Hi Peter, >> >> The "How to Manage "Snap to" Scrollbars" tutorial might help you: >> How to manage a slider snap-to behavior to make sure that the >> indicator lines up with the ticks especially on Mac OS X. >> You will access this tutorial through "Tutorials Picker" a free >> plugin that interfaces with the So Smart Software website in order to >> display all available tutorials stacks directly from the web. >> You will find it by going to http://www.sosmartsoftware.com/. >> Revolution/Plugins or Tutorials section. >> >> Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : >> >>> Is there a built-in way to create a slider that only stops at >>> increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, >>> 100)? >>> >>> Thanks! >> >> >> Best Regards from Paris, >> Eric Chatonet >> >> -- >> http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ >> >> >> ___ >> use-revolution mailing list >> use-revolution@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-revolution > > Peter T. Evensen > http://www.PetersRoadToHealth.com > 314-629-5248 or 888-682-4588 > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Hi Peter, Depends on the fact you want values showing or not. If you show values: yes you have to script it as you did it. Otherwise it's enough to set the endValue appropriately and multiply the thumbpos value to use it if needed. Best Regards from Paris, Eric Chatonet Le 5 déc. 06 à 22:49, Peter T. Evensen a écrit : Eric, How does that make you go by 20s? I want the slider to go from 0 to 100 by 20s, so if you have the slider at position 25, it will snap back to 20. Am I missing something? At 03:45 PM 12/5/2006, you wrote: Hi Peter, You can achieve your goal more easily with a oneliner: on mouseUp set the thumbPos of me to the thumbPos of me end mouseUp Best Regards from Paris, Eric Chatonet Le 5 déc. 06 à 22:35, Peter T. Evensen a écrit : Hi Eric, Thanks for the pointer. The one key I was missing is scrollbarDrag. I didn't know about that message. I implemented my own scrollbar value indicator that I move. Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. I'll have to think to see if I can come up with anything better. on mouseUp set the thumbposition of me to NearestThumbPos(the thumbposition of me) AdjustLabelPosition end mouseUp on scrollbarDrag lock screen AdjustLabelPosition unlock screen end scrollbarDrag function NearestThumbPos pPos put pPos div 20 into tNumTwenties put pPos mod 20 into tRemainder if tRemainder >= 10 then add 1 to tNumTwenties end if return 20 * tNumTwenties end NearestThumbPos on AdjustLabelPosition put the thumbposition of me into tPos put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" put (the width of me - 12) / the endValue of me into tPixelsPerValue put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc put the loc of field "Thumb Pos" into tFieldLoc put tThumbLoc into item 1 of tFieldLoc set the loc of field "Thumb Pos" to tFieldLoc end AdjustLabelPosition At 02:46 PM 12/5/2006, you wrote: Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution - --- -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Eric, How does that make you go by 20s? I want the slider to go from 0 to 100 by 20s, so if you have the slider at position 25, it will snap back to 20. Am I missing something? At 03:45 PM 12/5/2006, you wrote: Hi Peter, You can achieve your goal more easily with a oneliner: on mouseUp set the thumbPos of me to the thumbPos of me end mouseUp Best Regards from Paris, Eric Chatonet Le 5 déc. 06 à 22:35, Peter T. Evensen a écrit : Hi Eric, Thanks for the pointer. The one key I was missing is scrollbarDrag. I didn't know about that message. I implemented my own scrollbar value indicator that I move. Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. I'll have to think to see if I can come up with anything better. on mouseUp set the thumbposition of me to NearestThumbPos(the thumbposition of me) AdjustLabelPosition end mouseUp on scrollbarDrag lock screen AdjustLabelPosition unlock screen end scrollbarDrag function NearestThumbPos pPos put pPos div 20 into tNumTwenties put pPos mod 20 into tRemainder if tRemainder >= 10 then add 1 to tNumTwenties end if return 20 * tNumTwenties end NearestThumbPos on AdjustLabelPosition put the thumbposition of me into tPos put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" put (the width of me - 12) / the endValue of me into tPixelsPerValue put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc put the loc of field "Thumb Pos" into tFieldLoc put tThumbLoc into item 1 of tFieldLoc set the loc of field "Thumb Pos" to tFieldLoc end AdjustLabelPosition At 02:46 PM 12/5/2006, you wrote: Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Hi Peter, You can achieve your goal more easily with a oneliner: on mouseUp set the thumbPos of me to the thumbPos of me end mouseUp Best Regards from Paris, Eric Chatonet Le 5 déc. 06 à 22:35, Peter T. Evensen a écrit : Hi Eric, Thanks for the pointer. The one key I was missing is scrollbarDrag. I didn't know about that message. I implemented my own scrollbar value indicator that I move. Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. I'll have to think to see if I can come up with anything better. on mouseUp set the thumbposition of me to NearestThumbPos(the thumbposition of me) AdjustLabelPosition end mouseUp on scrollbarDrag lock screen AdjustLabelPosition unlock screen end scrollbarDrag function NearestThumbPos pPos put pPos div 20 into tNumTwenties put pPos mod 20 into tRemainder if tRemainder >= 10 then add 1 to tNumTwenties end if return 20 * tNumTwenties end NearestThumbPos on AdjustLabelPosition put the thumbposition of me into tPos put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" put (the width of me - 12) / the endValue of me into tPixelsPerValue put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc put the loc of field "Thumb Pos" into tFieldLoc put tThumbLoc into item 1 of tFieldLoc set the loc of field "Thumb Pos" to tFieldLoc end AdjustLabelPosition At 02:46 PM 12/5/2006, you wrote: Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Hey Peter, I don't think there's a built-in way to do this. You'll have to roll your own. I did stack that might help you get started - it's called Marty's Sliders in my Rev Online space, under Marty Knapp. Maybe that will help some (it doesn't do incremental stops though). Marty Knapp Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Hi Eric, Thanks for the pointer. The one key I was missing is scrollbarDrag. I didn't know about that message. I implemented my own scrollbar value indicator that I move.Here's what I wound up with in my script. I haven't tried this on the Mac yet. I don't like the hard-coded numbers; the might not work on the Mac. I'll have to think to see if I can come up with anything better. on mouseUp set the thumbposition of me to NearestThumbPos(the thumbposition of me) AdjustLabelPosition end mouseUp on scrollbarDrag lock screen AdjustLabelPosition unlock screen end scrollbarDrag function NearestThumbPos pPos put pPos div 20 into tNumTwenties put pPos mod 20 into tRemainder if tRemainder >= 10 then add 1 to tNumTwenties end if return 20 * tNumTwenties end NearestThumbPos on AdjustLabelPosition put the thumbposition of me into tPos put NearestThumbPos(the thumbposition of me) into field "Thumb Pos" put (the width of me - 12) / the endValue of me into tPixelsPerValue put the left of me + 6 + tPixelsPerValue * tPos into tThumbLoc put the loc of field "Thumb Pos" into tFieldLoc put tThumbLoc into item 1 of tFieldLoc set the loc of field "Thumb Pos" to tFieldLoc end AdjustLabelPosition At 02:46 PM 12/5/2006, you wrote: Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: slide with multiples of x?
Hi Peter, The "How to Manage "Snap to" Scrollbars" tutorial might help you: How to manage a slider snap-to behavior to make sure that the indicator lines up with the ticks especially on Mac OS X. You will access this tutorial through "Tutorials Picker" a free plugin that interfaces with the So Smart Software website in order to display all available tutorials stacks directly from the web. You will find it by going to http://www.sosmartsoftware.com/. Revolution/Plugins or Tutorials section. Le 5 déc. 06 à 21:43, Peter T. Evensen a écrit : Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Best Regards from Paris, Eric Chatonet -- http://www.sosmartsoftware.com/[EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
slide with multiples of x?
Is there a built-in way to create a slider that only stops at increments of x (e.g., of 20, from 0 to 100, so 0, 20, 40, 60, 80, 100)? Thanks! Peter T. Evensen http://www.PetersRoadToHealth.com 314-629-5248 or 888-682-4588 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution