Steven,
ESRI has quite a few samples on how to query data from a map service.
Below is the URL to all their samples. I suggest looking at the "Query Task" sample specifically.
All Samples - (Query Task samples listed in the left panel):
http://help.arcgis.com/en/webapi/flex/samples/index.html
Andrew