this.play(); this.addFrameScript(this.totalFrames,addListenerOnFinishFrame); function addListenerOnFinishFrame(){ this.stop(); this.addEventListener(MouseEvent.CLICK, secondClickEvent); }