Copy link to clipboard
Copied
Hello, I realize an interactive map of Morocco on Animate. About ten cities are pointed with, for each of them, a supposed button to reveal a small histogram. The code for the first city works normally : in the click the histogram appears correctly. On the other hand, the following city, with the same code (but names of ocurrence different) stops working.
Does anybody know the principle of coding the best adapted in this case? Thank you in advance for the answer. (May be an answer in french?:)
For information here is code i used
the first problem i see is both buttons are calling the same function. that can't be correct.
use different function names (eg, mrrakechF and cazablancaF) in the listener and function definition.
Copy link to clipboard
Copied
the first problem i see is both buttons are calling the same function. that can't be correct.
use different function names (eg, mrrakechF and cazablancaF) in the listener and function definition.
Copy link to clipboard
Copied
Thank you Kglad for your help.
I'll try to night (after work) new function names. I am unfortunately not very talented in coding. If I understood you, I may try something like that ? :
this.bt_marrakech.addEventListener("click",mrrakechF .bind(this));
function mrrakechF( )
{
this.graph_marrakeche.play( )
}
Copy link to clipboard
Copied
yes.
Copy link to clipboard
Copied
ok thank you again !
Find more inspiration, events, and resources on the new Adobe Community
Explore Now