与雪碧在运行时设置的一个Flex按钮的图标 [英] Set the icon of a Flex button with a Sprite in runtime

查看:137
本文介绍了与雪碧在运行时设置的一个Flex按钮的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要设置柔性按钮的图标。

I want to set the icon of a button in flex.

默认的语法如下:

myButton.setStyle("icon", iconClass);

和iconClass通常是嵌入的对象。

and iconClass is normally an embedded object.

但我想要做的是,用一个标准的雪碧或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.

这篇关于与雪碧在运行时设置的一个Flex按钮的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆