Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
_Vlad_

mouse Cursor & mouse Events

Recommended Posts

Dear all,

 

Could your help me with 2 questions linked with mouse, please.

 

1. Is it possible disable an automatically changes of cursor (rotate/scale/...)?

I would like to use my own pictures of cursor.

 

2. Is it possible to receive Event when cursor over/out a selected object?

This code didn’t gave me the positive result :(

var selectedDisplayObject : Sprite;
selectedDisplayObject.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);

var selectedItem : TransformItem;
selectedItem.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);

 

Thank you in advance for help,

Vlad

Link to comment
Share on other sites

1. Is it possible disable an automatically changes of cursor (rotate/scale/...)?

I would like to use my own pictures of cursor.

 

Sure, you can use your own cursors by simply setting the TransformManager.scaleCursor, TransformManager.rotationCursor, and TransformManager.moveCursor Shapes objects.

 

2. Is it possible to receive Event when cursor over/out a selected object?

 

If you want to know when TransformManager takes control of the cursor, you can listen for the TransformEvent.SEIZE_CURSOR event. And then when it releases the cursor, it dispatches a TransformEvent.RELEASE_CURSOR event.

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