flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject RE:using custom cursor leads to mouse lag on busy chart
Date Mon, 21 Oct 2013 20:37:28 GMT
Why not just reading the asdoc on custom native cursors, and give them a try:


There are also associated examples

De : modjklist@comcast.net [modjklist@comcast.net]
Envoyé : lundi 21 octobre 2013 22:15
À : users@flex.apache.org
Objet : Re: using custom cursor leads to mouse lag on busy chart

Perhaps this is a simpler method,


but it still depends on addChild(). How to convert to addElement()?

----- Original Message -----

From: modjklist@comcast.net
To: users@flex.apache.org
Sent: Monday, October 21, 2013 1:09:43 PM
Subject: Re: using custom cursor leads to mouse lag on busy chart

Seems like the Flash people use native cursors to overcome this:


Ross Henderson's answer in the link above uses Colin Moock's CustomMousePointer class to solve

which requires this class:

When I try to implement I get an error:

1067: Implicit coercion of a value of type flash.display:Sprite to an unrelated type mx.core:IVisualElement

Following recommendations here,


I tried to subclass the CustomMousePointer class as spark.core.SpriteVisualElement instead
of Sprite, but while this compiles, it doesn't display the cursor.

Any ideas how to convert this Flash example based on addChild() into Flex's spark using addElement()?

----- Original Message -----

From: modjklist@comcast.net
To: "apache flex users" <users@flex.apache.org>
Sent: Monday, October 21, 2013 11:58:00 AM
Subject: using custom cursor leads to mouse lag on busy chart


I've got a chart with a lot of data points on it. When the mouse enters this chart, a rollOver
handler sets a crosshair cursor using

private var crosshairCursor:Class;
CursorManager.setCursor(crosshairCursor, CursorManagerPriority.HIGH);

Note that this solution was based on the example from:

The problem is the crosshair cursor produces a very noticeable mouse lag when the user moves
the mouse over the plot. If I use the default system cursor, the is no lag.

Any ideas how to eliminate this lag? Seems to be related to the setCursor function. I just
want to change the cursor, keeping everything else the same. I want to get the same performance
as the default system cursor (e.g. pointer), but it seems not possible using the official
approach to set a custom cursor.

View raw message