我有5个不同的图像在5个不同的框架,我需要动画他们像一个滑块。
我构建这个代码:
function playNextFrame(){
if(_root._currentframe+1 == 7) {
gotoAndStop(2);
}else{
gotoAndStop(_currentframe+1);
}
}
var myTimer = setInterval(playNextFrame, 5000);但是当我单击导航按钮时(例如)
but1.onRelease = function() {
gotoAndStop(2);
};它在随机时间进入随机帧:/
如果你能帮助我的褪色效果,也会有很大的帮助。^^
发布于 2013-08-20 16:53:23
单击该按钮时,还需要清除间隔,使其不再触发。这可能是导致你的随机帧跳跃的原因。
but1.onRelease = function() {
clearInterval(myTimer)
gotoAndStop(2);};https://stackoverflow.com/questions/18326671
复制相似问题