I assume you have it all set up to start the animation and music. This will be checking if the audio is playing something. If there is no audio playing on this object the animation stops.
In the case, the audio source is not in the character you would have to fetch like so:
var go : GameObject;
function Start(){
go = GameObject.Find("Dancer");}
function Update(){
if(!audio.isPlaying)
go.animation.Stop();
}