Copy link to clipboard
Copied
Hi,
I've been using scaleX for datagrid. However, it scale both in positive and negative X direction equally. I wish to keep one side of the datagrid as constant and only scale datagrid in negative x direction? Is there a way to limit scale to a +/-ve axis?
Copy link to clipboard
Copied
scaling of DisplayObjects is dependend on where their registration point is located.
You should be able to move the registration point (indicated by the white dot in thge center of your object is you click on it) to the upper right corner.
Scaling should then happen around this point (insted of the center)
[Not tested if their are any limitations with components]
Copy link to clipboard
Copied
Thanks. but that would be hardcoding as i want to limit scale in different axis based on different 'if' conditions in as3..... is there a way to do such restrained scaling programmatically?
Copy link to clipboard
Copied
If you ask if there is a direct way to set the registraion point with code? as far as I know, no.
There are some solutions like the TransformMananger from Greensock, who pretty much works around this issue.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now