Progress Bar

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
Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Progress Bar

Post by Jamie37 » Mon Feb 22, 2016 10:13 pm

Hello,

Im new to the progress so bare with me...

Basically what I want to do is move the progress bar along 2 steps for instance over 10 seconds. I do not actually want it to be loading something and rather for it to just act as an animation before proceeding to the next card. Hopefully I am clear in what I am saying and somebody can help;

Many Thanks
Jamie

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9785
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Progress Bar

Post by dunbarx » Mon Feb 22, 2016 10:28 pm

Hi.

Make a progressbar. These sorts of gadgets are all "scrollBars" but with different properties. Make a button with this in its script:

Code: Select all

on mouseUp
   put  the endValue of scrollBar 1 into tEnd
   put round(tEnd / 50) into increment
   repeat 10
      set the thumbPos of scrollbar 1 to the thumbPos of scrollbar 1 + increment 
      wait 5
   end repeat
end mouseUp
Now please examine what this somewhat verbose handler does. You will likely have to think about initializing it now and then, and resetting it. Several items in the handler are arbitrary. Write back with your thoughts on all of that.

Craig Newman

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Progress Bar

Post by Dixie » Mon Feb 22, 2016 10:33 pm

Jamie..

Have a look at the attached... it might help...:-)
Attachments
Untitled 1.livecode.zip
(1.08 KiB) Downloaded 199 times

Jamie37
Posts: 53
Joined: Sat Dec 19, 2015 1:45 pm

Re: Progress Bar

Post by Jamie37 » Tue Feb 23, 2016 12:24 pm

Thank you both for your answers. I used yours dunbarx in the end. Again though thank you both for your help.

Jamie

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”