+ -
当前位置:首页 → 问答吧 → mc连续倒播,少了第一帧。

mc连续倒播,少了第一帧。

时间:2011-07-31

来源:互联网

on (press) {
       function prev(target) {
              target.gotoAndStop(target._currentframe);
              target.onEnterFrame = function() {
                     if (this._currentframe>1) {
                            this.gotoAndStop(this._currentframe-1);
                     }
                     if (this._currentframe == 1) {
                            this.gotoAndStop(this._totalframes);
                     }
              };
       }
       prev(_root.mc);
}

使用
if (this._currentframe == 1) {this.gotoAndStop(this._totalframes);}
不播放第一帧,就跳到最后一帧开始倒播,怎么解决,倒播完第一帧后,再跳到最后一帧进行倒播?

作者: nukh   发布时间: 2011-07-31

复制内容到剪贴板
代码:
on (press) {
              _root.mc.onEnterFrame = function() {
                  if (this._currentframe == 1) {
                           this.gotoAndStop(this._totalframes);
                }else{
                   this.prevFrame();
                }
                     
              };
}

作者: flash023   发布时间: 2011-07-31