My application has a graphicsLayer with a click handler on the that builds and displays an infoWindow with the graphic's attributes, and changes the symbol of the selected graphic to show that it has been selected. If I use only SimpleMarkerSymbols as the symbol for the layer the function works fine, but if I use a PictureMarkerSymbol as the symbol the function throws an "Error #1009: Cannot access a property or method of a null object reference" for the graphic var. protected function _ClickHandler(clk:MouseEvent):void { var graphic:Graphic = clk.target as Graphic; //reset unselected observationPts to correct symbol for(var n:Number=0;n<observationPts.graphicProvider.length;n++) { observationPts.graphicProvider.symbol = obsPtSym; } graphic.symbol = highlightedSym; showInfoWindow(); }With the symbols as:<esri:PictureMarkerSymbol id="obsPtSym" source="@Embed(source='assets/images/i_pin3_centered.png')" height="30" width="30" /> <esri:SimpleMarkerSymbol id="highlightedSym" alpha="0.9" color="0xFF0000" size="14" style="circle"> <esri:SimpleLineSymbol color="0x000000"/> </esri:SimpleMarkerSymbol>
In debug mode I see that clk.target = CustomSprite (@6177581), but the graphic var traces as null.Anybody dealt with this before?