Dear Aditya and Hans,

Thank you for your suggestion.
I add 

\startMPcalculation
 ....
\stopMPcalculation

and it works.

\setupinteraction[state=start]
\usemodule[animation]
\starttext
%\startanimation[menu=yes]
%{
\startMPcalculation
path p;
\stopMPcalculation
\dorecurse{\udCount}
{\useMPgraphic{foldUD}{num=\recurselevel}}
{\useMPgraphic{dotLines}{num=\recurselevel}}
%}
%\stopanimation
\stoptext

However, it draws all the figures under the \startanimation case.

There may be something I missed or there is something uncertain between \dorecurse and \startanimation.

Thank you.

Best regards,

Dalyoung