Search code examples
flex4componentsflash-builderflex-spark

Is there a way to notice the skin class of a Spark Button that his width have been modified?


I am resizing externally a spark button component, but inside if i have a Rect object and some Path it can be resize by setting them to 100% width.

But in case of many path or with a simple swf asset, is not working anymore.

The width can be setted correctly at first time you show the component. But after, i am not able to change it.

I am looking for a method or a handler inside the Spark architecture which can received the change inside the skin class, so i could adjust all the Visual Elements inside my class.


Solution

  • Just use the updateDisplayList Method, it should be good

    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
                {
                    super.updateDisplayList(unscaledWidth, unscaledHeight);
                    trace("unscaledWidth"+unscaledWidth);
                }