I am trying to achieve a rollover tolltip or InfoWindow effect for a feature layer. I've been using the "FeatureLayer tooltips" and "InfoWindow on MouseOver" samples as starting points. But the problem is I am working in an application based on the ESRI Flex Viewer, and I am having trouble figuring out when/where to attach the "Graphics Add" event handler to the feature layer.
From what I gather from the samples above, that handler must be added before the graphics are added to the layer, and therefore before the layer itself is loaded. Therein lies the problem when using the Flex Viewer. In the sample, this is easily addressed because the event can be attached right in the map/layer markup - it is not so easy (I don't think) in the Flex Viewer.
So the question is, where can I attach this event handler in the context of a Feature Layer in the ESRI Flex Viewer? I've been digging around under src/com/esri/viewer - it looks like I would have to do something custom within MapManager.mxml (for example, in the addLayerToMap method).
Am I on the right track here? What's the best way to go about this?