按钮仍然无法与 FLASH CS4 配合使用
好吧,我绝对没有编译器/输出错误了......但是,按钮仍然不起作用?有什么建议吗?
Replay_btn.addEventListener(MouseEvent.CLICK; 重播);
函数重播(事件:MouseEvent):void {
gotoAndPlay(25);
}
到底出了什么问题!!!请告诉我!!!
Okay, I have absolutely NO Compiler/Output errors anymore...however, the buttons are still not working? Any suggestions?
Replay_btn.addEventListener(MouseEvent.CLICK; replay);
function replay(event:MouseEvent):void{
gotoAndPlay(25);
}
WHAT THE HELL IS WRONG!!! PLEASE LET ME KNOW!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
其中不应有分号,而应有逗号:
should not have a semicolon in there but a comma:
解决了!
问题出在层次上。
Parent 剪辑有 4 层(自下而上);背景、水运动背景、MovieClip 概述、水运动前景。
我删除了顶层:水运动前景并进行了测试...它有效...但是,当我添加相同的水运动前景影片剪辑以显示影片剪辑的其余部分(概述)时。
然而,当我移动按钮:Replay_btn 和 Inside_btn 时,首先除了 Actionscript 框架层......它起作用了!
因此,如果您的按钮不起作用,但没有编译器或输出错误,请确保按钮集之上没有其他框架层。
SOLVED!
The Problem lied within the layers.
The Parent clip had 4 layers(bottom up); Background, Water Movement Background, MovieClip-Overview, Water Movement Foreground.
I removed the Top Layer: Water Movement Foreground and tested...It worked...however, when I added the same movie clip of Water Movement Foreground to show OVER the rest of the movie clip (overview).
However, when I moved the Button: Replay_btn and Inside_btn, above all except the Actionscript frame layer...it worked!
So, if your buttons are not working, but you have no Compiler or Output errors, ensure that there are no other Frame Layers ABOVE your button set.