I started this thread the other day in an attempt to resolve a coding problem I am having and received some really good answers. But after being deverted for a day on another project I am back and hate to keep being such a bother but I am truely over my perverbial head. Below is the funtion I am trying to get working but I keep getting an error 1034 telling me I cannot covert a featureset into an resultevent. I believe I understand the error but don't understand where it is coming from.
//*************************************************************************
public function runQueryTask(geometry:Geometry):void {
//*************************************************************************
[INDENT]
var queryTask:QueryTask = new QueryTask();
queryTask.url = "http://data.cmap.illinois.gov/ArcGIS/rest/services/Maps/TIP_Test/MapServer/0";
[LEFT]var query:Query = new Query();
query.geometry = geometry;
[LEFT]query.returnGeometry = true;
query.spatialRelationship = "esriSpatialRelContains";
query.outFields = ['PROID','PROGRAMMIN','COMPLETION'];[/LEFT]
[/LEFT]
queryTask.execute(query, new AsyncResponder(onXMLResult, onFault));
function onXMLResult(event:ResultEvent, token:Object=null):void{
[INDENT]
//xml = event.result.ArrayOfTipproject.tipproject;
[LEFT]var xmlListCollection:XMLListCollection = new XMLListCollection;
xmlListCollection.source = new XMLList(event.result.ArrayOfTipproject.tipproject);
[LEFT]var items:Array = [];
foreach(var queryXML:XML in xmlListCollection){[/LEFT]
[/LEFT]
[INDENT]
var obj:Object = {
project:queryXML.@PROID,
agency:queryXML.@PROGRAMMIN
[/INDENT]}
[/INDENT]}
items.push(obj);
[/INDENT]}