It sounds like the search function is expecting an argument to be passed to it. How is it declared in the code?
private function search(event:Event):void
{
var query:Query = new Query();
query.where = queryAttribute1 + "='" + txtSearch1.text + "'"+queryAttribute2 + "='" + txtSearch1.text + "'";
queryTask.url = featureURL;
queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
if (featureSet.features.length == 0){
Alert.show("Not found.");
}else if(featureSet.features.length == 1){
if(featureSet.features[0].geometry is MapPoint)
{
map.scale = 24000;
map.centerAt(featureSet.features[0].geometry as MapPoint);
}else{
map.extent = GraphicUtil.getGraphicsExtent(featureSet.features);
}
}else{
map.extent = GraphicUtil.getGraphicsExtent(featureSet.features);
}
}
function onFault(info:Object, token:Object = null):void
{
Alert.show(info.toString());
}
}