Flash 闪光停止循环动画

Flash 闪光停止循环动画,flash,animation,actionscript,actionscript-2,banner,Flash,Animation,Actionscript,Actionscript 2,Banner,我有一个Flash横幅,我需要一些元素在滚动它们的父对象时设置动画,然后停止,然后在滚动时运行不同的动画。只要用户表现良好,这就可以正常工作,但如果您抖动鼠标,以便快速连续出现多个滚动/滚动,则会使动画陷入无休止的循环。还有其他人遇到过这个问题吗 我的动作脚本是: on (rollOver) { //frames 2 - 10 are the "turn on" animation this.gotoAndPlay(2); //frames 11 - 25 are hou

我有一个Flash横幅,我需要一些元素在滚动它们的父对象时设置动画,然后停止,然后在滚动时运行不同的动画。只要用户表现良好,这就可以正常工作,但如果您抖动鼠标,以便快速连续出现多个滚动/滚动,则会使动画陷入无休止的循环。还有其他人遇到过这个问题吗

我的动作脚本是:

on (rollOver) {
    //frames 2 - 10 are the "turn on" animation
    this.gotoAndPlay(2);
    //frames 11 - 25 are house_three's "turn on" animation
    _root.house_three.gotoAndPlay(11);
}
on (rollOut) {
    //frames 11 - end are the "turn off" animation
    this.gotoAndPlay(11);
    //frames 26 - end are house_three's "turn off" animation
    _root.house_three.gotoAndPlay(26);
}
house_three(在本例中)具有
stop()s,当前对象具有
stop()s,因此在任何情况下都不应播放超过这些帧


我想这可能与许多动画实例排队有关,但这会使动画运行多次,然后停止(对吗?),但它似乎无限期地运行。

尝试在滚动和滚动中设置测试,以查看横幅当前是否正在播放。如果是,停止,然后玩

if(this.isPlaying)
{
    this.stop();
    this.gotoAndPlay(2)
}

我解决了这个问题。为了最小化文件大小,我在我的电影对象中使用了actionscript“暂停,然后播放”功能,正是这些暂停无限地排队。一旦我删除了这些,一次只复制几秒钟相同的帧,效果就很好了。不过,感谢您的帮助,我认为这个解决方案可能也能做到这一点(无法检查,一旦找到解决方案,就将坏代码清除掉)。