Select to view content in your preferred language

Need to override mouse rollover behavior for a flared graphic

676
2
Jump to solution
04-16-2012 12:53 PM
TyroneLigon
Deactivated User
When a flare symbol is expanded, the mouse rollover function expands the size of the flared marker and the mouse rollout contracts the flared marker to its original size. I also need the tool tip to appear during the rollover, as well as the execution of another function to show connectivity between two or more graphics. The original graphics that are being clustered have these behaviors added when they are created.

I want to attempt extending the flare symbol to show at the very least the tool tip on rollover, but I don't know the name of the method to override. I'm already using the flare click to execute a function, so that route isn't available to me.

Method name or other suggestions welcomed.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Tyrone,

   To get the event that is fired when you mouse over the graphic does not require you to extned the flare symbol. All you nee to do is add an event listener:

featureLayer.addEventListener(FlareMouseEvent.FLARE_OVER, flareOverHandler);


I could not get a conventional tooltip to show on mouseover of the graphic but here is a work around:

            private function flareOverHandler(event:FlareMouseEvent):void             {                 event.graphic.mouseChildren = event.graphic.mouseEnabled = true;                 map.infoWindow.closeButtonVisible = false;                 map.infoWindow.label = "Hello World";                 map.infoWindowContent = null;                 map.infoWindow.show(map.toMapFromStage(event.stageX, event.stageY));             }


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Tyrone,

   To get the event that is fired when you mouse over the graphic does not require you to extned the flare symbol. All you nee to do is add an event listener:

featureLayer.addEventListener(FlareMouseEvent.FLARE_OVER, flareOverHandler);


I could not get a conventional tooltip to show on mouseover of the graphic but here is a work around:

            private function flareOverHandler(event:FlareMouseEvent):void             {                 event.graphic.mouseChildren = event.graphic.mouseEnabled = true;                 map.infoWindow.closeButtonVisible = false;                 map.infoWindow.label = "Hello World";                 map.infoWindowContent = null;                 map.infoWindow.show(map.toMapFromStage(event.stageX, event.stageY));             }


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:
0 Kudos
TyroneLigon
Deactivated User
For those who are dense like me, the following FlareMouseEvent constants (apparently) are analogous to these mouse events for graphics:


  • FLARE_CLICK = MouseEvent.CLICK

  • FLARE_OVER = MouseEvent.MOUSE_OVER or ROLL_OVER

  • FLARE_OUT = MouseEvent.MOUSE_OUT or ROLL_OUT


So the roll over and roll out functions I have for my individual markers work with the flare over and flare out events in the flare marker. Make sure you add the event listener to the layer containing the graphics.
0 Kudos