Jump to content
Search Community

(horizontal or vertical) lockposition ?

artlover test
Moderator Tag

Recommended Posts

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

  • 4 weeks later...
Guest lexybam

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.
  • Create New...