Page 2 of 2

Re: Drawing a line between multiple slider 'thumbs'

Posted: Tue Nov 05, 2013 10:42 pm
by calmrr3
calmrr3 wrote:

Code: Select all

on scrollbardrag tThumbPos
     set the blendlevel of img "strip1" to tThumbPos/7
   set the points of graphic "line1" to 90,the thumbpos of scrollbar "scrollbar1" +20 & return & 130,the thumbpos of scrollbar "scrollbar2"+20
end scrollbardrag
This seems to work, although the line only moves in real time with the thumb of scroll bar 1, when I move the thumb of scrollbar 2 the line only moves (jumps) into position on mouseUp
Sorted it, just applied

Code: Select all

 set the points of graphic "line1" to 90,the thumbpos of scrollbar "scrollbar1" +20 & return & 130,the thumbpos of scrollbar "scrollbar2"+20
to the script of scrollbar2

Re: Drawing a line between multiple slider 'thumbs'

Posted: Wed Nov 06, 2013 12:10 am
by dunbarx
Nicely done.

Can you rewrite this using a repeat loop that finds each thumbposition of the 20 and sets the points accordingly? That way the whole shebang can be done in a handful of lines of code.

Look up the "repeat with counter = startValue [to | down to] endValue" form of the repeat control structure. I know you can do this.

Craig