Jump to content
Search Community

Display Object's width and height not updating

offshoresolutions test
Moderator Tag

Recommended Posts

Ah, as you can tell I'm not much of a Flex guy :)


There are numerous bugs in the Flex framework. I have spoken directly to Adobe about this and they have confirmed it. When transform.matrix values are updated (which TransformManager does), the width, height, scaleX, and scaleY properties are NOT updated properly! VERY frustrating. I made not of that on the TransformManager blog page. Anyway, if you need to find out the accurate values, you should be able to use the gs.transform.utils.MatrixTools class that came with TransformManager in conjunction with getBounds() to figure it out, like this:


var bounds:Rectangle = my_mc.getBounds(my_mc); //gets the unscaled dimensions of my_mc

var trueWidth:Number = bounds.width * MatrixTools.getScaleX(my_mc.transform.matrix);
var trueHeight:Number = bounds.height * MatrixTools.getScaleY(my_mc.transform.matrix);


Does that work okay for you?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...