Flash动画影片中使MC倒放?

  • 来源: 中国IT实验室 作者: somesun   2008-03-18/12:59
  • 问:怎样使MC倒放,从100帧放到第1帧停止,通过按钮控制正常播放MC,或倒放MC?如图:

    答:

    方法1、把这段代码加到倒放那个按钮去就可以了:(弃天笑提供)

    on (release) 
    {
            _root.onEnterFrame = function()
            {
                    if(this.mc._currentframe == 1)
                    {
                            delete this.onEnterFrame;
                    }
                    this.mc.prevFrame();
            }
    }

    方法2、(终极讨厌提供)

    a_btn.onRelease = function() {
    delete this._parent.mc.onEnterFrame;
    this._parent.mc.play();
    };
    b_btn.onRelease = function() {
    this._parent.mc.stop();
    this._parent.mc.onEnterFrame = function() {
      this.prevFrame();
    };
    };

    效果:

    [next]源文件:

    方法3、(kingofkofs提供)

    #p#分页标题#e#

    源文件:

    其实以上三种效果是一样的,只要知道flash有前进和返回帧的函数就可以了,具体怎么实现是要看你放在哪里了.


    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多