flex - 向下翻转数字显示,就像复古时钟一样?
我想在我的应用程序中显示一个数字,以便数字的样式像复古风格的时钟,其中每个数字看起来像一个可翻转的标签(例如, http://net.tutsplus.com/tutorials/html-css-技术/学习如何创建复古动画翻转时钟/)。我实际上不需要任何动画或效果。
开源库中是否存在这样的组件?如果没有,并且我想制作自己的组件,您对继续操作有何建议(例如,我应该设置标签或按钮的样式,还是......)?
I want to display a number in my app so that the digits are styled like a retro-style clock, where each digit looks like a flippable tag (e.g., http://net.tutsplus.com/tutorials/html-css-techniques/learn-how-to-create-a-retro-animated-flip-down-clock/). I don't actually require any animation or effects.
Does such a component exist in an open source library? If not, and I want to make my own component, what suggestions do you have for proceeding (e.g., should I just style a label or button, or ...)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以前也研究过这个。我找不到任何开源版本,但我确实在 activeden.net 上找到了一些相对便宜的版本。但它们都不适合我的需求。如果我要自己为 Flex 3 创建一个组件,我将创建一个具有小时和分钟属性的自定义组件,然后重写 updateDisplayList 方法来绘制我的翻转数字。或者,您可以让自定义组件显示几个图像并更新其源属性以指向适当的嵌入翻转数字图像。如果 Flex 4 适合您,您可以在组件的自定义皮肤中完成所有这些操作。希望有帮助。
I've looked into this before too. I couldn't find any open source versions, but I did find a few available on activeden.net that were relatively inexpensive. None of them suited my needs though. If I were to create one myself for Flex 3, I would create a custom component that had hours and minutes for properties, then override the updateDisplayList method to draw my flip numbers. Alternatively you could have your custom component display a couple of images and update their source properties to point to the appropriate embedded flip number image. If Flex 4 is an option for you, you could do all of this in a custom skin for your component. Hope that helps.