当前位置: 代码迷 >> Flex >> Flex 动态设立 Skin 、Style
  详细解决方案

Flex 动态设立 Skin 、Style

热度:5771   发布时间:2013-02-26 00:00:00.0
Flex 动态设置 Skin 、Style

??/** Flex3 的写法 */
????StyleManager.getStyleDeclaration("mx.controls.Button").setStyle("overSkin", skins.iconClass);
????
????/** Flex4 的写法 */
????var styleManager:IStyleManager2 = FlexGlobals.topLevelApplication.styleManager;?
????styleManager.getStyleDeclaration("mx.controls.Button").setStyle("overSkin", skins.iconClass_m);

???? /** 加载全部样式?*/

????var styleManager:IStyleManager2 = FlexGlobals.topLevelApplication.styleManager;?
????styleManager.loadStyleDeclarations2("defaults.swf");

  相关解决方案