我已经做了一个动画在闪光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());
}
}如何通过使用操作脚本代码或使用时间线函数来执行此操作?
发布于 2018-04-25 16:36:07
你应该使用框架插件来尝试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-of-tweenmax-framelabel-and-frame-plugins-nifty-way-to-play-a-flash-timeline-backwards/
https://stackoverflow.com/questions/50017215
复制相似问题