Jump to content
Search Community

H-Flipped image rotates on select/move action

ronaldo71 test
Moderator Tag

Recommended Posts

Hi,

 

I'm using TransformManager 1.85, dated 10/28/2009. I'm not sure if that's the latest, the greensock homepage mentions 1.82 :)

Anyway, when I move a symbol that's mirrored horizontally (h-flipped with a scaleX < 0), the target rotation is set to 180 and the target's scalyY is set to < 0.

But when I move something, the rotation should remain untouched AFAIK and the scaleX and scaleY should remain untouched (I'm not resizing).

It's rather annoying...

 

I traced it down to the TransFormManager's updateSelection method, in line 1236, see the arrow below in the code. Maybe the transform matrix doesn't cope with flipped symbols?

 

public function updateSelection($centerOrigin:Boolean=true):void { //Includes resizing the _dummyBox.
 if (_selectedItems.length != 0) {
...
if (_selectedItems.length == 1) {
	...
	if (!t.hasOwnProperty("content") && t.width != 0) { //in Flex, SWFLoaders/Images and some other components don't accurately report width/height
		...
-----------------> _dummyBox.transform.matrix = t.transform.matrix = m; <----------------- Here's the line that sets the rotation and scaleY
	} else {
		r = t.getBounds(t);
		_dummyBox.graphics.drawRect(r.x, r.y, r.width, r.height);
		_dummyBox.transform.matrix = t.transform.matrix;
	}
} else {
           ...
       }
}

 

I hope it's a small bug, not a 'feature'.

 

Best regards,

Ronaldo

Link to comment
Share on other sites

Nope, that's not a bug - it's just how Flash reports values when transformations are made via the transform.matrix (which is necessary in order to accommodate all the features in TransformManager, particularly multiple selections). Annoying, I know. The problem is not specific to TransformManager. :(

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