Actionscript 3 在Flash CS3中回放动画
我已经在Flash CS3中制作了一个动画,我需要在时间轴中反转它。 我试过这个,但不起作用:Actionscript 3 在Flash CS3中回放动画,actionscript-3,Actionscript 3,我已经在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(t
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.
请看这里: