Progress Bars - Updating Current Value via Transcript

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
toledor
Posts: 7
Joined: Sat Apr 08, 2006 7:21 am
Location: San Francisco
Contact:

Progress Bars - Updating Current Value via Transcript

Post by toledor » Sat Apr 08, 2006 7:27 am

Hello All-- a newbie here. With regards to progress bars, how do I update the current value using Transcript? I've attempted: set the current value of the progress bar "progressBar" to 25. There does not seem to be much documentation regarding this component.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Sat Apr 08, 2006 7:45 am

Hi toledor,

the thumbpos property is what you are after.

set the thumbpos of scrollbar "myProgressbar" to myValue

Basically a progress bar is a scrollbar control.

Hope that helps,

Malte

toledor
Posts: 7
Joined: Sat Apr 08, 2006 7:21 am
Location: San Francisco
Contact:

Progress Bars - Updating Current Value via Transcript

Post by toledor » Sat Apr 08, 2006 7:54 am

Malte, thank you; that code worked like a charm (never would have thought of thumbpos). BTW, I'll be purchasing Arcade Engine once I get past the basics; I'd like to build some arcade-style games for my 3 and 5 year old. Thank you again!

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Progress Bars - Updating Current Value via Transcript

Post by malte » Sat Apr 08, 2006 9:13 am

toledor wrote:Malte, thank you; that code worked like a charm (never would have thought of thumbpos). BTW, I'll be purchasing Arcade Engine once I get past the basics; I'd like to build some arcade-style games for my 3 and 5 year old. Thank you again!
Hi toledor,

it might be helpful to get past the besics if you peek at the free eBook I wrote. It covers some of the basics of using Revolution and if you want to use arcadeEngine it might be very helpful. When you start creating your games and I can help in any way, please post questions in the arcadeEngine board of this forum. :-)
I am eager to see what you come up with. My son is 2 now, so maybe he gets something to play, once he is old enough. ;-)

All the best,

Malte

toledor
Posts: 7
Joined: Sat Apr 08, 2006 7:21 am
Location: San Francisco
Contact:

Post by toledor » Sun Apr 09, 2006 3:48 pm

Malte, will certainly do! Downloaded the tutorial and reviewing. This is going to be fun.

gcanyon
Posts: 1
Joined: Sat Apr 08, 2006 7:45 am

Re: Progress Bars - Updating Current Value via Transcript

Post by gcanyon » Wed Apr 12, 2006 8:49 pm

toledor wrote:Malte, thank you; that code worked like a charm (never would have thought of thumbpos). BTW, I'll be purchasing Arcade Engine once I get past the basics; I'd like to build some arcade-style games for my 3 and 5 year old. Thank you again!
One thing that inevitably comes up: if you have (say) 10,000 things to do and you set the progress bar to have an endvalue of 10,000 and then set the thumbPosition of the progress bar to the number of items done, if the items go by quickly the limiting factor on speed will be the updates to the progress bar.

There are at least two ways to deal with this. Either do the math ahead of time to know how many pixels there are in the progress bar, and then update it only when the display has moved a pixel; or keep track of time, and only update when a certain amount of time has gone by.

Examples of both can be found in the archives for the use-revolution mailing list.

Post Reply

Return to “Off-Topic”