Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
MrMastermindNL

FlexTransformManager issues

Recommended Posts

Hi there,

 

I purchased the amazing TransformManager classes to use in a Project, but we're running into some issues. We are using the FlexTransformManager in a Flex 4 project. We are building the project using a code behind pattern, so all item that go into the FlexTransformManager are created dynamically in the AS3 class files.

 

The first thing we ran into was that it would not display the item added to the transform manager. After some tests we found out that it only shows the item and the transform handlers when you set the bounds property.

 

The next thing we ran into is the question for this post. We want to be able to move, rotate and scale an image. That is all working fine within the bounds rectangle. But we want users to be able to move the image so far outside the bounds rectangle to have let's say only the right bottom corner of the image shown in the top left of the bounds and still be able to rotate and scale it.

I've tried setting the bounds rectangle larger to something like:

 

transformManager = new FlexTransformManager({bounds:new Rectangle(-150, -150, 710, 710)})

 

This works partly because as soon as you move part of the transform item over or under an other object on stage, parts of the handlers and handlers rectangle around the item dissapear.

 

The question is now, how can we build this so that you can move the item so far that you can still grab the item to move, rotate or scale but the rest is outside the working area?

 

 

I hope the question is a bit clear.

 

Cheers,

Marco

Link to comment
Share on other sites

As far as things disappearing, I bet you just forgot to set a width or height for the FlexTransformManager, so when you select something and it tries to enforce the bounds (which are the same as the width/height by default), it must scale the object infinitely small to fit into the 0/0 width/hight.

 

As for things getting clipped, you should be able to just set the clipContent property to false on the FlexTransformManager.

 

Does that help?

Link to comment
Share on other sites

Hi Jack,

 

Thanks for the quick answer! the clipContent to false did the trick for the clipping, that's probably why you called it clipContent ;-)

 

As for the bounds and width and height, we need to be using the boundsRectangle in our project, because that can have negative values, so we can have the bounds larger than the area where you use the transform tool. In our project we want the user to be able to set only part of the object in the area. So we'll mask the bounds and we're set.

 

Thanks again!

 

Cheers,

Marco

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.
×