在运行时使用 Sprite 设置 Flex 按钮的图标 [英] Set the icon of a Flex button with a Sprite in runtime
本文介绍了在运行时使用 Sprite 设置 Flex 按钮的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 flex 中设置按钮的图标.
I want to set the icon of a button in flex.
默认语法如下.
myButton.setStyle("icon", iconClass);
而 iconClass 通常是一个嵌入对象.
and iconClass is normally an embedded object.
但我想要做的是,使用标准的Sprite 或 MovieClip(我在运行时找到的)作为图标.
But what I want to do is, use a standard Sprite or a MovieClip (which I find during runtime) as the icon.
这可能吗?有人做过吗?
Is this possible? Has anyone done this?
谢谢!
推荐答案
找到了可能的解决方案.http://blog.benstucki.net/?p=42 将在此之前和报告.
Found a possible solution. http://blog.benstucki.net/?p=42 Will give this ago and report.
这篇关于在运行时使用 Sprite 设置 Flex 按钮的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文