Jump to content


Resize cursor persists

Recommended Posts

Hi Jack,


I'm loving your transform manager, it's saved the life of my current project! I may have come across something though. If the destroy method is called while a resize/move/scale cursor is displayed that cursor persists after the manager has stopped. It might be a dirty fix, but I've fixed this for my application by adding swapCursorOut(null); to the destroy method.

Link to comment
Share on other sites

Good catch. I just posted an update that resolves that issue. Just log into your GreenSock account to get it. https://www.greenscok.com/account/


Glad to hear TransformManager has been serving you well :)

Link to comment
Share on other sites

That does seem to have fixed it, thank you!


I have another issue now, but this time I can offer no explanation. I'm using the Transform Manager in two different places in my app. The first is to scale a bitmap object that is already on the stage, and looks like this:

scaler = new TransformManager({targetObjects:[currentImg],constrainScale:true, allowKeyMove:true,autoDeselect:false,bounds:new Rectangle(0,0,440,440)});


The second is as part of a drag-drop system, where the user picks items from a list and drags them to an area. Once the mouse button is raised, the item is added to an edit area, and pushed into the Transform Manager.

private function init():void
   manager = new TransformManager({allowDelete:true, allowKeyMove:true});
   manager.addEventListener(TransformEvent.FINISH_INTERACTIVE_MOVE	, onMoveItem);

//called when an item is released over the target area
public function addItem(item:DisplayObject):void{

//used to delete items removed from the edit area	
private function onMoveItem(evt:TransformEvent) : void {
   if(!mc_drop.hitTestPoint(mouseX,mouseY,true)) {
        /item dropped outside edit area, lets kill it


Now for the problem I have. In the first example it is only possible to move the item by hovering the mouse over the bounding rectangle or the center point icon, but in the second example the entire area of the item acts as a hit area for the move. Apart from the target's casting, which is Bitmap in the first example and DisplayObject in the second, I can't see any difference that would cause the differing behaviour. Any ideas?

Link to comment
Share on other sites

It sounds like in the first example, it's acting as though the hasSelectableText was set to true (although it shouldn't be if it's just a Bitmap). That's for cases where the object is something like a TextArea where the user's mouse must be able to interact with the object (like show a text cursor instead of the move cursor). Could you send me an example FLA or Flex project that demonstrates the issue? The simpler the better.

Link to comment
Share on other sites

I'm a bit flat out at the moment (still intending to build you an example of video interrupting the SplitTextField class when I have some spare time), but I can tell you that it's not hasSelectableText. I added a trace to the addItem function that shows it set to false.

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.