There is a way for you to do it much simpler. First of all, use the same sprite for all the white keys, and also just one sprite for all the black keys.
That way, when you want to compare if the player has clicked on the correct key you can just check with the UID. Also, this example takes that animation frame0 is the original and frame1 is the image of it being played in the replay and frame2 is the image for when the player has clicked on the key.
WhiteKeySprite frame = 1--->set varkey = WhiteKeySprite.UID
Mouse on left clicked WhiteKeySprite-->whiteKeySprite set frame to 2
subevent
Pick WhiteKeySprite with UID = varkey
subevent
WhiteKeySprite frame =2--> do your actions since for the correct key pressed
Else--> do your actions for wrong key pressed
As for a sequences, you can do that with arrays. It will be perfect for your situation, so if you are not familiar with it, now is a great time to start learning about it.
Rekjl,
Thank you so much on your time and effort to help me out, that is how I made my first piano
but I totally understand your point.
I will give my best to apply your example on my project...and soon as I do that I will come back to show what I did and maybe to ask something more
Thank you very much for your help