Skip navigation
Currently Being Moderated

Can you set a property in a SkinClass dynamically

Nov 29, 2013 7:33 AM


Ive created my own class for for a button...


<s:Button label="1" height="150" width="150" skinClass=""  />



In my LayoutBtnSelector I have added an image....


<s:Image id="anImage" source="assets/imgs/layoutSelectors/double.png" verticalAlign="middle" horizontalAlign="center"/>



This is all works fine but for each button I create I want to set that image Source... Is their a means to do that dynamically?




  • Currently Being Moderated
    Dec 3, 2013 9:05 AM   in reply to home_aidan



    You can use property "icon", for example.

    Something like that:


    <s:Image id="anImage" source="{hostComponent.getStyle('icon')}" verticalAlign="middle" horizontalAlign="center"/>


    or try to use skin part name of appropriate skin part


    <s:Image id="iconDisplay" verticalAlign="middle" horizontalAlign="center"/>

    Mark as:

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