i was try to create a simple skinable component,and in its skin,i add create an inline component
skin mxml code like this
<fx:Declarations> <!--define an inline component --> <fx:Component className="RedRect"> <s:Group> <s:Rect width="12" height="12" x="-6" y="-6" > <s:stroke> <s:SolidColorStroke color="0xff0000" /> </s:stroke> </s:Rect> </s:Group> </fx:Component> <!--use that inline component --> <local:RedRect id="myRedRect" /> </fx:Declarations>
but i've no idea how to define the component "myRedRect" in my skinable component as file
public var myRedRect:IFactory
can someone give a clear anwser plz?
PS:if i can't use incline component,finally,i have to define a new component outside,i really don't wanna add more mxml files
I do not fully understand your question, but maybe this link will be helpful http://stackoverflow.com/questions/3933503/is-it-possible-to-create-skinnable-components-i n-mxml-using-the-spark-component