BernalCarlos Posted February 20, 2013 Share Posted February 20, 2013 Hi, I have a Sprite with a button in the center. The sprite can be transformed, but when the mouse is over the button the cursor stays in its default TransformManager move cursor. So, to keep the default "button" cursor (the one with the hand and the finger) when the mouse is over the button., i did the following: _uploadPhotoHereMessageMc.addPhoto_btn.addEventListener(MouseEvent.MOUSE_OVER, showButtonCursor, false, 0, true); private function showButtonCursor(evt: Event): void { if(_transManager.isShowingCustomCursor) TransformManager.customizeMoveCursor(new Shape(), false, 0, 0); } However, i'm getting a null pointer exception from the TransforManager: StackTrace: TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo. at com.greensock.transform::TransformManager/snapCursor()[D:\datos\CarlosB\Documentos\Dropbox\PlasticoLab\Pixote2\PhotobookMaker\com\greensock\transform\TransformManager.as:2275] "No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo" -> means null pointer in Spanish. Is there a better way to do this? Link to comment Share on other sites More sharing options...
GreenSock Posted February 21, 2013 Share Posted February 21, 2013 Yeah, those aren't designed to be swapped in/out while in use like that - they're meant as configuration tools. Have you tried just hiding the cursor and setting Mouse.show()? Kinda like: yourTransformManager.moveCursor.visible = false; Mouse.show(); And then of course toggle those back when necessary. Link to comment Share on other sites More sharing options...
BernalCarlos Posted February 21, 2013 Author Share Posted February 21, 2013 Just exactly what i need. Thank you jack. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now