I'm trying to create a simple legend that shows the layers and symbology from a Dynamic Map Service. When I use code from the ESRI legend component sample the legend appears as an icon with a red circle crossed out. Attached is the icon, below is my code. Any ideas why this is happening? Thanks.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Legend Component">
<esri:Map id="myMap">
<esri:extent>
<esri:Extent xmin="-10753431" ymin="4624151" xmax="-10737799" ymax="4635884">
<esri:SpatialReference wkid="102100"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISDynamicMapServiceLayer id="baseLayers"
url="http://arc-srv-02/ArcGIS/rest/services/Flex_Services/Scott_Base_Layer_Flex/MapServer/">
</esri:ArcGISDynamicMapServiceLayer>
</esri:Map>
<esri:Legend id="myLegend"
width="250" height="100%"
layers="{[ baseLayers ]}"
map="{myMap}"
respectCurrentMapScale="true"/>
</s:Application>