This is driving me nuts. I am developing a Web App using ArcGIS Flex API, Flex SDK 4.5, and Flex Viewer 2.4.
I add a bunch of point graphics to the map. Then on rollover I try to add a Flex mx:Panel to the info window by using the map.infowindow.addChild() method. It compiles fine, but I get a runtime error:
"Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. at spark.components.supportClasses::SkinnableComponent/addChild()"
This is puzzling - Flash Builder show map.infowindow.addChild(), not map.infowindow.addElement(). Has anyone seen this before? Code below. Thanks.
public function onMouseOverHandler(event:MouseEvent):void
{
var gr:Graphic = Graphic(event.target);
map.infoWindow.closeButtonVisible = true;
map.infoWindow.label = "Test";
map.infoWindow.addChild(aPanel);
myInfo.show(map.toMapFromStage(event.stageX, event.stageY));
}
<mx:Panel id="aPanel" width="200" height="300" />
