Download LiveCode Lite

Transcript
Fig. 31-1. Scroll Bar Property Inspectors.
PROGRESS BAR PROPERTY INSPECTOR
Progress bars are used to visually display the progress of a process over time.
START VALUE (startValue): Sets the number you would like to use as the
starting value of the progress bar.
END VALUE (endValue): Sets the number you would like to use as the ending
value of the progress bar.
CURRENT VALUE (thumbPosition): You may want to follow the progress of a
timed operation, whose duration you know. For instance, the duration of a movie
may be 18500, as indicated in the Quicktime Player’s Property Inspector. Say
you want to display the progress of the movie with your own Progress Bar. In the
Progress Bar’s Basic Properties you would indicate the START value
(startValue) of the bar (the start time you would like the progress to begin at,
which would be 0 in this case), as well as the END VALUE (endValue) of the
operation, which would be 18500. The CURRENT VALUE (thumbPosition) is the
position of the scrollbar at the present time. You would give a command that will
start the movie and at the same time start the scroll bar moving. You need a
script to do this. The following is a simple script that you could place in a button:
on mouseUp
play player 1
repeat until the currentTime of player 1 is 18500
set the thumbPosition of scrollbar 1 to the currentTime of player 1
end repeat
end mouseUp
143