Well, if you have 2 instances, all you need to do is insert each click event on each instance.
You can give each instance a different name so it is easier to know which one you are addressing.
It doesn't work like that because my buttons are inside a Symbol "my_own_audio_player" with a play, pause and stop audio buttons.
When I put an action on the button inside de "my_own_audio_player_instance1" it will change all over the others instances.
It is like I have 3 movieclips in my project and on each movieclip I have 2 or 3 "my_own_audio_player" playing differents audio files.
Sorry to use the movieclip but I really prefer that to Symbols... ;-)
So, if I understand right, you are using the same symbol and it has actions in it that of course are the same. Another idea would be to duplicate that symbol in the symbol library so that you can change the code inside them since that when you duplicate in the elements panel it is the same instance and therefore the same code.
Hi, thank you resdesign,
But I wanted to try not to duplicate the symbol, to make it a proper code, I guess.
I wanted to bind actions from outside de symbol. It can work, but I have to know how to recognize which button was clicked.
I guess they do have an adress like : symbol1.buttonPlay, symbol2.buttonPlay,symbol3.buttonPlay.
- You could give an id name to your buttons like this:
then use the name with #
- You could add a class name and use that.
Questions - are you creating these symbols dynamically?
What version of Animate are you using?
You could also add a flag.
P = 0;
// do something
// do something
hey Thanks resdesign !
I think you give me good hints. I'll check them out tomorrow in the afternoon and I let you know.