Toggle the button error? ..... Help, please!

Hello

I did activate/a Disable button so if you click on it, the windows will be ejected and pop in I used this command:

home_btn.addEventListener (MouseEvent.CLICK, toggleContent);
function toggleContent (event: MouseEvent) {}
If (home page.currentFrame == 1) {}
Homepage.gotoAndPlay (2);
}
else {}
Homepage.gotoAndPlay (12);
}

And it works fines just for a button, and when I try to add the second button and use the same command and follow the previous steps as the error appears saying: 1021: duplicate function definition. WHY?

Help please!

Very well. The code looks good. Except that you do not have a movieclip/object with the name 'home1_btn '. Give the instance name of "home1_btn" button

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • How to make a vertical text in fcpx?

    Im trying to align my vertical text in fcpx and I can't seem to find a way to do it. Can someone please explain how?

  • hp4645: fax

    the fax is allowed in most of the time, but when send you by fax to the company uses PC to receive fax Fax will be failed. I know because i use the hp4645 to fax to society, it will be impossible, but when I use another fax machine will be ok. I wond

  • print job is not accepted (mavericks of mac OS)

    Hi, my HP Laserjet P1102w used to work well, but he kept recently have error saying 'printer in use - use of the printer was not admitted. I'm on macbook pro and OS's mavericks. I don't know why I get this error message, since there is no jobs in the

  • Add RAM - Pavilion 15-p047nl

    HelloI'll add RAM on my laptop HP Pavilion 15-p047nl? It is not a small backdoor my last laptop has. When I buy, I asked the saleswoman if I could add ram and he replied in the affirmative.So, can I do it by myself without void the warranty?

  • High utilization of the processor for Taskmgr.exe (Vista)

    My HP laptop with Vista still seem to work at 20-30% cpu usage.I have disabled all unnecessary programs, hard drive and network are not accessible, internet security scans are disabled.The Task Manager and resource monitor shows what is Taskmgr.exe.