对单个AnimationState注册回调出错

对单个AnimationState注册回调出错
Anim = this.node.addComponent(cc.Animation);
var anim1 = Anim.getAnimationState(‘2’);
anim1.on(‘stop’, this.onDH_BUFF_STOP, this); 提示on没有声明,我自己声明了也不行,不回调,请问怎么解决呢?

文档中写的是可以单个注册回调的。但是我搜索论坛好像这个功能不行?

还是具体应该怎么用,按https://docs.cocos.com/creator/manual/zh/animation/scripting-animation.html说的不行呢

确实不那能用 。 官网可以更新下, 已经没有这个功能。。。。。