So in my current project I am often extending MovieClip to get full visual functionality such as interaction with the display list.
Now in many of these cases my objects are resizable and upon a resize I want to change various things so that my object remains in the correct proportions. Now actionscript changes properties by saying things like:
myObj.width = 100.
I’m having 2 problems with this. First, I can’t override that behavior to allow my own code to run based on a new width because width is a property, not a method. I suppose I could attach a listener to my object within itself and then run whatever I want when the width changes, but is there a more direct way of adding behavior when something like width, or an x and y value are changed?
Second, when you change the width of a MovieClip it starts skewing things. I definitely do not want the stuff inside my objects to get skewed, is there a way to prevent this?
So basically I’m trying to get myObj.width = 100 to run something of my choosing to make the new width 100.
Thanks.