Added an onComplete function to Animation.