如何随着进度改变进度条的颜色?
Flex 3 使用 barColor 会很容易,但作为 barColor Flex 4 中不再提供如何设置进度条,以便进度流体随进度改变其颜色。
就像以浅绿色开始并以鲜红色结束一样。
It would have been easy with Flex 3 using barColor but as barColor is no more available in Flex 4 how can I setup progress bar such that the progress fluid changes it's color with progress.
Like starting progress with the shades of lighter green and ending at bright red.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里回答了类似的问题:如何在 Flex/ActionScript 中动态填充进度条?
简而言之,为进度条创建一个自定义皮肤并用渐变填充它(如果我理解正确的话)。我链接的解决方案是针对分段版本,但您可以将重复的渐变停止点替换为单个停止点以获得平滑的渐变。
希望有帮助。
I answered a similar question here: How to dynamically fill a progress bar in Flex/ActionScript?
In a nutshell, create a custom skin for the progress bar and fill it with a gradient (if I'm understanding you correctly.) The solution I linked is for a segmented version, but you can just replace the repeating gradient stops with single stops to get a smooth gradient.
Hope that helps.