Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

What's going on with my timeline?

Participant ,
Nov 21, 2018 Nov 21, 2018

Hi guys,

Simple question, wondering about 'actions'.

I have 3 buttons. When user clicks one of them, this.play();

Btn3 gets clicked on the first question and Btn1 gets clicked on the second question.

However, button 1 and 3 are both visible on both questions. So when we click Btn3 on the second question, it still does play().

I'm wondering about actions and the timeline because I have specified above each section what I want - but it's still reading it from previous actions.

Please let me know if you have any insights!

447
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 22, 2018 Nov 22, 2018

yes, among the ways you can do that is to use removeEventListener() to deactivate a button when you no longer want it to respond.  but it would be better to remove it or fade it so it doesn't mislead users into thinking it should still be active.

Translate
Community Expert ,
Nov 21, 2018 Nov 21, 2018

eugener2418576  wrote

Hi guys,

Simple question, wondering about 'actions'.

I have 3 buttons. When user clicks one of them, this.play();

Btn3 gets clicked on the first question and Btn1 gets clicked on the second question.

However, button 1 and 3 are both visible on both questions. So when we click Btn3 on the second question, it still does play().

that is exactly what should happen.  what do you want to happen?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 22, 2018 Nov 22, 2018

I'm wondering why the actions is carrying over to the other actions - or does it not matter where I add the actions to the timeline? Is there a way I can have the actions only run once?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2018 Nov 22, 2018
LATEST

yes, among the ways you can do that is to use removeEventListener() to deactivate a button when you no longer want it to respond.  but it would be better to remove it or fade it so it doesn't mislead users into thinking it should still be active.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines