What I did is add an event listener to each graphic that I added to my map.for each (var graphic:Graphic in featureSet.features) { graphic.toolTip = "Site ID: " + graphic.attributes["Site_ID"]; graphic.addEventListener(MouseEvent.ROLL_OVER, onMouseOver); //you could also add MouseEvent.CLICK graphic.id = "Dive"; }
I am able to get the graphic's information in the onMouseOver eventprivate function onMouseOver(event:MouseEvent):void { var graphic:Graphic = Graphic(event.target); var objectid = graphic.attributes["OBJECTID"] //etc