Hey,I am so interested about that you had ever used the ‘TransformTool’ library in your Flex project. But there is little examples showing how to use it in flex, Would you please share some example about how to use ‘TransformTool’ in Flex? I have tried as such a way:
but it failed at line
canvas.addChild(defaultTool);
Can you give any hints? Thanks.
Like most pure AS3 display classes, the TransformTool needs to be added to a UIComponent wrapper to function properly in Flex.
It is so great. Thanks a lot.
Expects example with detailed source code.
You are so nice. The source code is availiable now. Thank you very much.
But I have a little problem. Do I have to add the TransformTool to the top level container such as Application in your example? Based on your example, if I use
hbox.addChild( component);
then something strange happends. It seems that the TransformTool is ‘under’ the image and can not response to moving action the rotation point can not be seen yet.
I add the TransformTool to the top level container.
when u rotate then scale, the scale doesnt follow properly the cursor because of the difference between mouse coordinates which are always with a ‘virtual’ rotation=0 and the angle of the object.
i had the same bug while doing my class. I used this :
var rotationRad:Number = rotation * Math.PI / 180;
var px:Number = XY.x * Math.cos(rotationRad) - XY.y * Math.sin(rotationRad);
var py:Number = XY.x * Math.sin(rotationRad) + XY.y * Math.cos(rotationRad);
hope it’ll work
I think there is one line missing in the function scaleTopRightInteraction. Add below
_toolMatrix.ty += oldBounds.subtract(boundsBottomLeft).y;
the line:
_toolMatrix.tx += oldBounds.subtract(boundsBottomLeft).x;
Otherwise, scaling of a rotated target does not work properly.
There is also the issue with resizing the browser. The controls and the target move apart as soon as the browser window is resized.
I don like it, it just implements matrix, in some cases this is great, but if I’m applying to an container, I don want scale the container (just width/height), imagine that I have a frame border on that picture, then the border will stretch too.. i had senocular full implemented on adigitalbook.com, then i had to remove
@rui
That was ultimately why I stopped using this tool and went with ObjectHandles instead.