automatic progressabar

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
margu
Posts: 15
Joined: Sat Apr 20, 2013 12:59 pm

automatic progressabar

Post by margu » Sun Apr 21, 2013 2:27 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: automatic progressabar

Post by Mark » Sun Apr 21, 2013 4:26 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply