Copy link to clipboard
Copied
Hi All,
I have two buttons on the stage. Instance names = "btn_begin" and "btn_touch" btn_begin works fine but I can't get the second one to work at all.
Frame name "gobabygo" is frame 1, and frame 200 also has a name "touchscreen1" I have tried both the name and number.
Here is my code, it's sitting on frame 140.
======
this.stop();
this.btn_begin.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_7.bind(this));
function fl_ClickToGoToAndPlayFromFrame_7()
{
this.gotoAndPlay("gobabygo");
}
this.btn_touch.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_8.bind(this));
function fl_ClickToGoToAndPlayFromFrame_8()
{
this.gotoAndPlay(200);
}
======
Thanks! Any help is appreciated.
That code is ok. Here is working example with your code https://ufile.io/6g9eb , check instance name of your btn_touch button.
Copy link to clipboard
Copied
That code is ok. Here is working example with your code https://ufile.io/6g9eb , check instance name of your btn_touch button.
Copy link to clipboard
Copied
Thanks Marjam,
Yes. You were right. There was two instance names for the button. One name before the tween and another after the tween.
Thanks!
Dan