Appearance of progress bars/sliders

Malte Brill malte.brill at t-online.de
Sat Nov 30 05:42:01 EST 2002


Hi Mark,

perhaps I can give you a leg up.

I tried the following:

Created a stack, one card 1 button, a proress bar called "scale", a graphic
called "box".

in the cardscript:

global flag
on opencard
  put 1 into flag
end opencard 

In the buttonscript:

global flag,ratio
on mouseUp
  put the width of scrollbar "scale"/the endvalue of scrollbar"scale" into
ratio
  put flag*-1 into flag
  send los to me
end mouseUp
on los
  set the thumbposition of scrollbar "scale" to the thumbposition of
scrollbar "scale"+1
  if the thumbposition of scrollbar "scale"=the endvalue of scrollbar
"scale" then set the thumbposition of scrollbar "scale" to 0
  if flag=-1 then
  send los to me in 5 ticks
  send los to graphic "box" in 5 ticks
  end if
end los

in the graphicscript:

global ratio
on los
  set the rectangle of me to 0,50,the thumbposition of scrollbar
"scale"*ratio,70
end los


Hope that helps,

Malte




More information about the use-livecode mailing list