Hi,
For the application that I am developing in AIR, I have removed the chrome through the app.xml. I am managing the features of minimizing, maximizing, close, resize and all other functions from within the application. I am facing a problem with resize feature. I have defined the grips for resizing and also I am able to display my custom cursor when mouse moves over it. The problem is that only the part of this cursor is visible which lies inside the boundary of the application rest of the cursor image is hidden.
For implementing the custom cursor, I do the following.
- Embed the cursor image.
[Embed(source='/resources/images/resize_right.png')] public var resizeRight:Class;
- Add the event listener to the canvas that acts as a grip.
rightResizeGrip.addEventListener(MouseEvent.MOUSE_OVER, function(e) { setResizeCursor(CURSOR_RIGHT); }); rightResizeGrip.addEventListener(MouseEvent.MOUSE_OUT, function(e) { unsetResizeCursor(); });
- In setResizeCursor
private function setResizeCursor(type:String) { var cursorClass; var xOffset; var yOffset; switch(type) { case CURSOR_RIGHT: cursorClass = resizeRight; xOffset = -14; yOffset = -10; break; case CURSOR_LEFT: cursorClass = resizeLeft; xOffset = 0; yOffset = -10; break; case CURSOR_RIGHT_TOP: cursorClass = resizeRightTop; xOffset = -20; yOffset = 0; break; case CURSOR_RIGHT_BOTTOM: cursorClass = resizeRightBottom; xOffset = -20; yOffset = -20; break; case CURSOR_BOTTOM: cursorClass = resizeBottom; xOffset = -10; yOffset = -14; break; case CURSOR_LEFT_BOTTOM: cursorClass = resizeLeftBottom; xOffset = 0; yOffset = -20; break; case CURSOR_LEFT_TOP: cursorClass = resizeleftTop; xOffset = 0; yOffset = 0; break; } if(cursorClass) CursorManager.setCursor(cursorClass, CursorManagerPriority.HIGH, xOffset, yOffset); }
Is it possible to have the complete image of the cursor shown though it lies outside the application boundary?