Progress Bar help!

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
acwilson96
Posts: 22
Joined: Tue Nov 26, 2013 9:55 pm

Progress Bar help!

Post by acwilson96 » Mon Dec 02, 2013 10:48 pm

I am trying to use a progress bar to count down from 30 seconds so the bar will start full then empty over 30 seconds, here is my code:

Code: Select all

on progressStart
   repeat with progressNumber = 1 to 1800
      set thumbPos scrollbar userAnswerScrollbar to (1800 -progressNumber)
   end repeat
   call recordAnswer
end progressStart
//60 ticks per second, 60*30=1800
Also is there any way I can type or use buttons whilst the progress bar is running?

All help appreciated!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Progress Bar help!

Post by Simon » Tue Dec 03, 2013 1:49 am

Hi acwilson96,
I'm interested in what made you think a repeat loop had anything to do with ticks? OK, maybe code runs on tick cycles? (oh that's not it btw)

I've got an answer, but see if you can figure out how to do this without using a repeat loop but using "send" instead.
See if this helps you get going;

Code: Select all

 send "progressStart" to me in 1 tick
If you need more help just ask.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply

Return to “Games”