DoubleCursor
< Flex
< Technique
< Work
< alain
Get flash to fully experience Pearltrees
Problem Always wanted a smoother experience when it comes to getting your mouse cursor changed in flash well now its possible. and you don't even need to wait for your users to have the latest flash player version.
The most common way of changing a cursor in Flash apps seems to be based on simply hiding the native OS cursor and displaying a graphic (drawn by the Flash Player) inside the Flash rectangle where the (hidden) cursor would be. This is what mx.managers.CursorManager does, for example. The reason why I find this approach unacceptable is that Flash Player isn't nearly fast enough at updating the cursor graphic, leading to some very visible lag in the cursor movement, which I find to be a pretty fundamental usability problem and annoyance, making the whole app seem slower than it really is. On the other hand, I've noticed that the CSS cursor property implementation in browsers works like it should -- i.e. there's no visible lag in the cursor movement when using it to implement a custom mouse cursor. So my question is: is there any way to use the CSS cursor property (or any other method that doesn't involve lagging, slow cursor movement) to change the cursor on top of a Flash rectangle?
Answer: Most modern browsers support the following cursor styles (hover your mouse over the style name to see the cursor change to that style): auto move no-drop col-resize all-scroll pointer not-allowed row-resize crosshair progress e-resize ne-resize default text n-resize nw-resize help vertical-text s-resize se-resize inherit wait w-resize sw-resize To set or change the mouse cursor style for an element of your page from script, you can set the element's property element.style.cursor to one of the above values. (Alternatively, without JavaScript, you can use the attribute style="cursor:value;" in that element's HTML tag.)
When this page loads, the mouse pointer should change to a 'hand'. A custom cursor is defined by the "cursor:" style property CSS (cascading style sheets). The easiest way to change the cursor type is to add a style="cursor: crosshair" property within an HTML tag. e.g.
Path // → → CSS AND CURSORS You don’t like the hand cursor that appears over your links? Want arrows denoting where pages are going to open on your page, or help marks appearing on certain links? Well, you’re going to need a few of these classy pointer codes then, which are easy to get through CSS. This page was last updated on 2010-01-08 Changing the Cursor
The cursor cannot be hidden in Chrome when Flash is running in "opaque" or "transparent" window mode (a bug). The workaround would be - if your Flash application can run without this mode - to set your wmode option to "window" or remove the option (the default is "window"). The wmode option is something u would change in your HTML file, where either the flash HTML tag is generated or has been put there staticly. Just open up your HTML file and search for the word "wmode".