我正在尝试做一个测验。我刚刚开始使用 actionscript 3.0,所以请提供任何帮助。
所以基本上我试图让我激活或
停用它们的事件侦听器的四个按钮,我尝试过“removeEventListener”和 if 语句但是我不能让它工作。请帮帮我,谢谢。
/////////navigation for t,o,y and a////////////////////////////////
a.addEventListener(MouseEvent.CLICK, gotosomething1);
function gotosomething1 (event:MouseEvent):void
{
gotoAndStop(89);
}
yy.addEventListener(MouseEvent.CLICK, gotosomething2);
function gotosomething2 (event:MouseEvent):void
{
gotoAndStop(89);
}
t.addEventListener(MouseEvent.CLICK, gotosomething3);
function gotosomething3 (event:MouseEvent):void
{
gotoAndStop(89);
}
o.addEventListener(MouseEvent.CLICK, gotosomething4);
function gotosomething4 (event:MouseEvent):void
{
gotoAndStop(89);
}
/////me trying to use the if statement for removing event listener on "a"////////
if(MouseEvent.CLICK, gotosomething2) && (MouseEvent.CLICK, gotosomething3) && (MouseEvent.CLICK, gotosomething4)
{
a.removeEventListener(MouseEvent.CLICK, gotosomething1);
}
////////////////////end//////////////////////////////////////////
////////////////////////////////////////////////////