protected function _frameLoop():void {
if (_style.visible && _style.alpha > 0.01) {
this.index = _index, _index++;
if (this._index >= this._count) {
if (loop) this._index = 0;
else {
_index--;
stop();
}
event(Event.COMPLETE);
}
}
}
这里刚开始渲染最后一帧时,就会发出complete。也就是收到这个事件时,最后一帧刚刚显示出来。如果在complete回调里去移除特效或者切换动作,最后一帧只会显示一瞬间,看起来就像丢帧了。