Jump to content
Search Community

Registration point for transformations

zircomfp
Moderator Tag

Recommended Posts

Posted

Is it possible to set the registration point for transformations?

Either on the Transformanager or on the TransformItem?

 

I tried changing the TransformItem's origin property but it has no effect...

 

Thanks!

Posted

Just searched the forums a little better... sad that it can't :-(

Posted

I managed a semi-simple workaround: I created an invisible shape proxy of my transformed object which serves as the TransformItem, and replicate its transform values to the real object whose center has been shifted...

 

private function init():void{
// _tm is my transformManager
_tm.addEventListener(TransformEvent.MOVE, transformUpdateHandler, false, 0, true);
_tm.addEventListener(TransformEvent.SCALE, transformUpdateHandler, false, 0, true);
_tm.addEventListener(TransformEvent.ROTATE, transformUpdateHandler, false, 0, true);
}
private function transformUpdateHandler(e:TransformEvent):void {
TweenMax.to(_realObject, 0, {scaleX:tranformItem.scaleX, scaleY:tranformItem.scaleY, rotation:tranformItem.rotation, x:tranformItem.center.x, y:tranformItem.center.y});
}

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