Page 1 of 1

automatic progressabar

Posted: Sun Apr 21, 2013 2:27 pm
by margu
how can i create a progress bar that start without buttons?
when the card open the bar must start and in a few seconds (5 seconds) end and then a video must be play
names
first card: card id 1010
progress bar: Progress Scrollbar
video: video.mov
thank
and sorry for the bad english

Re: automatic progressabar

Posted: Sun Apr 21, 2013 4:26 pm
by Mark
Hi,

Usually, a progress bar is used while something else is happening. What is this something else exactly?

Code: Select all

on preOpenCard
  put the long id of scrollbar "Progroess Scrollbar" into myBar
  set the thumbVal of myBar to 0
  set the startValue of myBar to 1
  set the endValue of myBar to 500
  repeat with x = 1 to 500
    set the thumbVal of myBar to x
    wait 10 millisecs with messages
  end repeat
  start player "video.mov"
end preOpenCard
This script assumes that you have a player control that contains your movie and is called "video.mov". If you explain what you need this for, I might come up with something better.

Kind regards,

Mark