Blending progress bars

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Blending progress bars

Post by SteveTX » Mon Dec 20, 2010 10:02 pm

I have a field of text that I would like to have change color according to a progress bar. The field text is blue, the progress bar is green. So I want the text from left to right to go from blue to green as the progress bar fills, but not have any other part of the progress bar show using the text field as a negative mask (so all of the progress bar is obscured EXCEPT in the shape of the text.

What is the best way to accomplish this?

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Blending progress bars

Post by SteveTX » Tue Dec 21, 2010 2:47 am

As an aside, blendScrAtop seems to be what I want to work, but for some reason none of the structural blends are working. The objects themselves are 24-bit png so they already have alpha layers. However, they still just seem to act like regular transparency blends when i test them out on the blend slider. They do not behave like displayed in the blend sample slider. Are there any better examples or rev stacks showing structural blend implementations?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Blending progress bars

Post by bn » Tue Dec 21, 2010 1:07 pm

Hi Steve,

I dont really understand what you are trying to do. An image or somesuch would help.

Walt Brown did a stack that shows the many ways structural blend work.

http://forums.runrev.com/phpBB2/viewtop ... ing#p27151

Kind regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Blending progress bars

Post by bn » Tue Dec 21, 2010 1:39 pm

Hi Steve,

I append a little stack that has a graphic with a gradient and a text field. The text changes with the gradient of the graphic.

Is that what you mean? Just the text changes color?

Kind regards

Bernd
Attachments
changeColorOfText.livecode.zip
(962 Bytes) Downloaded 367 times

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Blending progress bars

Post by SteveTX » Wed Dec 22, 2010 5:24 pm

I would like the text to act as a cutout or mask for a progess bar, and only where the layers intersect should the progress bar be shown like in the attached image.
Attachments
progress.png
progress.png (3 KiB) Viewed 6352 times

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Blending progress bars

Post by bn » Wed Dec 22, 2010 10:48 pm

Hi Steve,

I gave it a try. Have a look at it. If you want to do something like this then be careful what is grouped and what the blendings are.

Actually I would rather go for a more standard progress bar. But here you go.

Kind regards

Bernd
Attachments
changeColorOfText 0.1.livecode.zip
(1.38 KiB) Downloaded 386 times

Post Reply