Hey there:] At first I thought it would be an easy task to get width and height. But when I tried it, none of the explicit width and measuredWidth worked when resizeMode is set to s: Group scale.
So, I found a way, but I'm not sure if this is the best solution:
write this in the script tag:
import mx.core.mx_internal; Use the mx_internal namespace
then if you have
Group id = "group" resizeMode = "scale" and s: button id = "myButton" inside it
to, for example, get the width of myButton, just calculate the group. $ scaleX * myButton.width
Hope this works.
all the best, blz
source
share