Jump to content
Search Community

(horizontal or vertical) lockposition ?

artlover
Moderator Tag

Recommended Posts

Posted

hi all,

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

 

thanks,

best regards...

Posted

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;
	myManager.updateSelection(false);
}
}

Posted

thanks Jack :)

 

Is it possible make objects snap to a grid ?

Posted

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

  • 4 weeks later...
Guest lexybam
Posted

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.

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