1 Reply Latest reply on Jan 24, 2011 12:00 PM by Wrataxas

    Change z of component from within the skin?

    Wrataxas Level 2

      In a skin I wrote I want to change the z of the hostComponent when the skin is in the "selected" state.  I haven't found a good spot to put this.  I tried overriding updateDisplayList() but it doesn't get called at the right time, i.e. when the skin state goes from "normal" to "selected".  Is there some other function I can override?  Or is there some place in the mxml to put this?

       

      Thanks.

       

      BTW, I want to change the z to go with adding a drop shadow when the component is selected.  It looks funny that the top part of the component doesn't change but the bottom part appears to lift up due to the drop shadow.

        • 1. Re: Change z of component from within the skin?
          Wrataxas Level 2

          Is there a function in the skin that gets called when the hostComponent calls invalidateSkinState()?  I could override whatever that is and set the z there.

           

          Or is there a draw function in the skin?  It seems there must be, but I've poked around and haven't been able to discover it yet.  That too would be a candidate for overriding.