Clip containing 3 buttons.
Hello people.
I have a Movie Clip containing 3 buttons.
One of the 3 buttons has the right answer to a given question.
the buttons have the following occurrence names:
Button 1: sul_01_opcao_1
Button 2: sul_01_opcao_2
Button 3: sul_01_opcao_3
And the Movie Clip has the occurrence name: sul_pergunta_01
The problem that is occurring is that all buttons are going to the same frame when pressed.
My code looks like this:
this.sul_pergunta_01.sul_01_opcao_1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));
function fl_ClickToGoToAndPlayFromFrame()
{
this.gotoAndPlay(5);
}
this.opcao_2.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));
function fl_ClickToGoToAndPlayFromFrame()
{
this.gotoAndPlay(11);
}
this.opcao_3.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));
function fl_ClickToGoToAndPlayFromFrame()
{
this.gotoAndPlay(5);
}