一些导航按钮工作,其他没有

时间:2022-07-15 23:18:44

the buttons within my submenue movie clip don't work. the one's not within a submenu work fine.
my code validates and i'm not getting any errors
any idea on what else i should be checking?

我的子菜单影片剪辑中的按钮不起作用。一个不在子菜单内工作正常。我的代码验证了,我没有得到任何错误,我还应该检查什么?

///this one doesn't work////    
aboutSub.bio.addEventListener(MouseEvent.CLICK, goBio);
function goBio(evtObj:MouseEvent) {
    gotoAndStop("bio");
}


/// this one works////    
home.addEventListener(MouseEvent.CLICK, gohome);
function gohome(evtObj:MouseEvent) {
    gotoAndStop("home");
}

1 个解决方案

#1


0  

for testing purposes try adding an event listener to the aboutSub MovieClip and see if that works. If it doesn't then check that you don't have another DisplayObject above it and make sure that you have not set anything like mouseEnabled = false or mouseChildren = false on the aboutSub.

出于测试目的,尝试向aboutSub MovieClip添加一个事件监听器,看看是否有效。如果没有,则检查您上面没有其他DisplayObject,并确保在aboutSub上没有设置mouseEnabled = false或mouseChildren = false之类的内容。

If it does work then check that in aboutSub clip that there are no DisplayObjectsw above the buttons etc (so same principle as the first paragraph)

如果它确实有效,那么检查aboutSub剪辑中按钮等上方没有DisplayObjectsw(原理与第一段相同)

#1


0  

for testing purposes try adding an event listener to the aboutSub MovieClip and see if that works. If it doesn't then check that you don't have another DisplayObject above it and make sure that you have not set anything like mouseEnabled = false or mouseChildren = false on the aboutSub.

出于测试目的,尝试向aboutSub MovieClip添加一个事件监听器,看看是否有效。如果没有,则检查您上面没有其他DisplayObject,并确保在aboutSub上没有设置mouseEnabled = false或mouseChildren = false之类的内容。

If it does work then check that in aboutSub clip that there are no DisplayObjectsw above the buttons etc (so same principle as the first paragraph)

如果它确实有效,那么检查aboutSub剪辑中按钮等上方没有DisplayObjectsw(原理与第一段相同)

相关文章