从自定义组件获取CSS样式值

从自定义组件获取CSS样式值,css,actionscript-3,apache-flex,flex4.5,flex4.6,Css,Actionscript 3,Apache Flex,Flex4.5,Flex4.6,我有一种风格: .rating{ fontSize:24; } 以及s | Graphic类型的自定义MXML组件。如何从actionscript中的组件获取fontSize值 我试过: public var fff:String = getStyle("fontSize"); //undefined (runtime error) public var fff2:String = this.getStyle("fontSize"); // undefined (compile t

我有一种风格:

.rating{
      fontSize:24;
}
以及s | Graphic类型的自定义MXML组件。如何从actionscript中的组件获取fontSize值

我试过:

public var fff:String = getStyle("fontSize"); //undefined (runtime error)
public var fff2:String = this.getStyle("fontSize"); // undefined (compile time error)

有关更多信息,请查看此页面


somevar=this.getStyle(“fontSize”)添加到初始化功能

关闭是什么意思??我非常确定它的fontSize在flex中,甚至没有关于字体大小的代码提示;请将其添加为答案,谢谢。