Jump to content

Guest kinjal.patel

TargetObject Property

Moderator Tag

Recommended Posts


I am using flex transform manager.and i am facing one problem from last few days that I am not getting targetobject's height and width.it always shows 0 Height and 0 Width.

Please let me what should be the problem.


Thanks in advance

Link to comment
Share on other sites

Could you provide a sample project that demonstrates the problem? It's very difficult to troubleshoot without seeing any code or being able to see what's happening in context.


Also keep in mind that there are quite a few bugs, inconsistencies, and quirks in the Flex framework itself that have nothing to do with TransformManager and I wonder if those might be at play here. For example, have you tried calling invalidateSize() on your object? Or validateNow()? There are several other similar methods that you may need to call in order for your Flex stuff to kick in and report its measurements properly. And again, those are all unrelated to TransformManager.

Link to comment
Share on other sites

Hello ,

Kindly refer attached Application.

[Deleted file because it contained the source code for TransformManager]

Link to comment
Share on other sites

Yep, that is definitely a bug in Flex, not TransformManager. Thanks for posting the example Flex project - it demonstrated things very well. You can see how Flex incorrectly reports width/height in this scenario.


One solution is to tell TransformManager to set the targetObject's size through its width/height setters like this:


OLD: titem=designcan.addItem(newcanvas);

NEW: titem=designcan.addItem(newcanvas, TransformManager.SCALE_WIDTH_AND_HEIGHT);


Oh, and for what it's worth, I noticed that you've got a VERY old version of TransformManager - there have been many updates since 2009 when your copy was created/purchased. You might want to log into your GreenSock account and get the latest version. https://www.greensock.com/account/

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.