I am working on having a mouse over on my Feature layer. I tried implementing the code shown in the Mouseover on Feature Layer. http://help.arcgis.com/en/webapi/flex/samples/index.html#/InfoWindow_on_MouseOver/01nq0000001q000000... I get the Type error: Error # 1034: Type coercion failed. Please see the attached image. It is the problem with com.esri.ags.Graphic. I guess I'm doing something wrong here. I really appreciate your help here. Thanks much.
Here is my code: protected function fLayer_graphicAddHandler(event:GraphicEvent):void { event.graphic.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler); event.graphic.addEventListener(MouseEvent.MOUSE_OUT, onOutHandler); } private function onMouseOverHandler(event:MouseEvent):void { var gr:Graphic = Graphic(event.target); //this is where the problem is? gr.symbol = mouseOverSymbol; myTextArea.htmlText = "BeachName:" + gr.attributes['GIS.Samplets.BEACH_NAME'] + "\n" + "BeachName:" + gr.attributes['GIS.Samplets.BEACH_NAME'] + "\n"; myMap.infoWindow.closeButtonVisible = false; myMap.infoWindow.show(myMap.toMapFromStage(event.stageX, event.stageY)); } private function onOutHandler(event:MouseEvent):void { var gr:Graphic = Graphic(event.target); gr.symbol = defaultsym; myMap.infoWindow.hide(); }