Well, I can't test it because it is implemented for Windows only (tries to execute asdoc.exe).
But I have written my own solution for the lack of an ant task for asdoc:
<exec executable="${FLEX_HOME}/bin/asdoc" dir="${basedir}">
<arg value="-source-path"/>
<arg path="${basedir}/src"/>
<arg value="-doc-sources"/>
<arg path="${basedir}/src"/>
<arg value="-output"/>
<arg path="${DOC_DIR}"/>
<arg value="-main-title"/>
<arg path="${ant.project.name} Documentation"/>
<arg line="-library-path+=${basedir}/libs"/>
</exec>
Of course, you have to change the executable to asdoc.exe if you are on windows. I don't know if you also have to replace all / with \ or if ant does this for you. The last can be omitted if you don't use any .swcs which aren't already on the library-path. Or at least you have to change it to point to the right directory.
Edit: I have looked at the source code of the asdoc-task and it is essentially the same I do with my exec-task, it just only allows a small subset of command line arguments.
I also have tested my solution without the source-path argument and to my surprise it still worked. I did some further testing and this is what I found out:
When no source-path is specified, asdoc(.exe) assumes src
as a default. Thus the asdoc-task usually works if you use that convention (e.g. Flex Builder does this), but fails if you don't.
So to use the asdoc-task you have to name your source directory src
.