Skip navigation
KentWood2012
Currently Being Moderated

how to add a skinpart to an inline component?

Jul 18, 2013 9:44 AM

Tags: #declarations #inline_component

hi

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

 

[Skinpart(type="spark.components.Group")]

public var myRedRect:IFactory

 

can't work...

 

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points