我已经在Flash CS3中制作了一个动画,我需要在时间轴中扭转这一点。我尝试了这个,但它不起作用:
if(!this.flag)
{
this.flag=1;
this.stop();
this.fwd_btn.addEventListener("click", fl_MouseClickHandler.bind(this));
function fl_MouseClickHandler() {
this.on("tick", ffwd.bind(this));
}
this.rew_btn.addEventListener("click", fl_MouseClickHandler_2.bind(this));
function fl_MouseClickHandler_2() {
this.on("tick", rewind.bind(this));
}
function ffwd(e) {
this.gotoAndStop(this.currentFrame + 1);
}
function rewind(e) {
this.gotoAndStop((this.currentFrame + this.getDuration() - 1) % this.getDuration());
}
}
如何使用动作脚本代码或使用时间表函数来执行此操作?
您应该尝试带有框架插件的Greensock Tweenmax,它使您可以非常简单地转到特定的帧(甚至相反(。您也可以针对标签。
TweenMax.to(this, 2, {frame:1});
//In 2 seconds, stage timeline will go to first frame.
在这里查看:http://www.snorkl.tv/2010/10/overview-ove-oview-ob-thinemax-framelabel-and-frame-and-frame-frame-plugins-nifty-nifty-way-way-way-way-play-a-a-flash-play-a-flash-timeline-向后/