flex 在单个进度条中显示多个部分
我需要在单个进度栏中显示多个部分,其中每个组件具有不同的颜色。任何人都可以建议我任何外部组件或任何想法来实现这一点。
谢谢安吉
I need to show multiple sections in single progress bar where each component is of different color. Can any one suggest me any external component or any idea to implement this.
Thanks
Anji
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不久前不得不这样做,并选择采取以下路线:
我通过扩展 DownloadProgressBar 构建了一个自定义预加载器,然后将其与这个 Degrafa 组件集成。 http://degrafa.org/source/CapacityIndicator/CapacityIndicator.html
创建自定义预加载器,我想我使用了这个方法: http://iamjosh .wordpress.com/2007/12/18/flex-custom-preloader/
,然后创建一个单独的类,负责动态调整上面链接的 degrafa 组件中的值。当然,在您的 SWFDownloadProgress 函数(在进度事件上)中,您可以相应地调整这些值。
我发现这是实现最视觉上令人愉悦的组件的最快且相当干净的方法,尽管还有其他几种方法可以做到这一点,这里是一个类似问题的帖子,其中第二个答案(不是我的)显示了处理它的替代方法:
如何在 Flex/Actionscript 中动态填充进度条?
祝你好运:)
Had to do this a while back and opted to take the following route:
I built a custom preloader by extending the DownloadProgressBar and then integrated it with this Degrafa component. http://degrafa.org/source/CapacityIndicator/CapacityIndicator.html
To create the custom preloader, I think I used this tute: http://iamjosh.wordpress.com/2007/12/18/flex-custom-preloader/
and then created a separate class that was responsible for dynamically adjusting the values in that degrafa component linked above. And then of course in your SWFDownloadProgress function (on the Progress Event), you can adjust those values accordingly.
I found this to be the quickest and a fairly clean way of doing it to achieve the most visually pleasing component, although there are other several ways to do it, here is a post for a similar question, where the second answer (not mine) shows an alternate way of handling it:
How to dynamically fill a progress bar in Flex/Actionscript?
Good luck :)
我最近回答了一个类似的问题,您可能会觉得有用:如何动态填充进度条
简而言之,您可以基于 ProgressBarSkin 创建自定义皮肤。希望有帮助。
I recently answered a similar question that you may find useful: How to dynamically fill a progress bar
In a nutshell, you create a custom skin based on the ProgressBarSkin. Hope that helps.