Mootools如何在完成补间时执行代码?

Jai*_*Jai 2 mootools

我有这个:

this.slides[this.slideIndex].set('tween', {duration: '3000'});
this.slides[this.slideIndex].tween('opacity', '1');
Run Code Online (Sandbox Code Playgroud)

例如,我可以在效果完成后显示警告信息?

Chr*_*ove 7

您可以使用

this.slides[this.slideIndex].set('tween', 
{
 duration: '3000',
 onComplete: function() {alert('msg');}
}

);
Run Code Online (Sandbox Code Playgroud)