Jump to content

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

(horizontal or vertical) lockposition ?

Recommended Posts

hi all,

Is it possible to lock only the horizontal(or vertical) position?



best regards...

Link to comment
Share on other sites

You could use event handlers to do something like that. For example, to limit movements to up-and-down (vertical):


var item:TransformItem = myManager.getItem(mc);
myManager.addEventListener(TransformEvent.START_INTERACTIVE_MOVE, startMoveHandler);
var startX:Number;
function startMoveHandler(event:TransformEvent):void {
startX = item.x;
myManager.addEventListener(TransformEvent.MOVE, moveHandler);
function moveHandler(event:TransformEvent):void {
if (item.x != startX) {
	item.x = startX;

Link to comment
Share on other sites

thanks Jack :)


Is it possible make objects snap to a grid ?

Link to comment
Share on other sites

No "snap to grid" functionality is built into the current version of TransformManager, no. But you can certainly build that feature yourself.

Link to comment
Share on other sites

  • 4 weeks later...

To do that is very simple. Just follow the procedure provided by the system, then you should get going with the lock position of the horizontal. I dont really know of the vertical.

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.