I have a project that I am working on in which I've made a couple tiny modifications to the TransformManager, and I've run into a bit of a problem. First let me explain the situation.
I have Sprite A, Sprite, B, and Sprite C.
Sprite C is my TransformItem; its parent is Sprite B. Sprite B's parent is Sprite A. So the Heirarchy looks like A->B->C.
TransformManager normally puts the lines and handles (_dummyBox_mc/_selection_mc) in the TransformItem's parent, in this case B.
However, in my project, Sprite B is masked which masks the handles and lines as well, so I modified the TransformManager to put the lines/handles in sprite A. This works fine without any problems until...
Sprite B can be dragged around inside of Sprite A. When Sprite B is dragged, the lines/handles no longer match up to where the Sprite C is on stage. Obviously this is because the x/y value for Sprite C hasn't changed. So, somehow I need to offset the handles/lines x/y values based on how far Sprite B has moved. I have that value in the TransformManager class, and that is where I am getting stuck.
I can successfully get the lines/handles to render in the correct position and can drag around Sprite C successfully. However, as soon as I try to scale Sprite C, the lines/handles position gets changed and no longer works correctly. Deselecting then reselecting will restore them to the correct spot.
I'm sure the modification needs to happen in setOrigin() or possibly setScaleOrigin() but I've been tinkering around with the values all day and still haven't been able to get it to work 100% correct.
I'd really appreciate any help possible. If the situation isn't clear, let me know and I will try to elaborate further.