Handling displayed items/pictures attributes (position,width,height)

Hello everyone,

I have a picture displayed which i turned into a button. When touched, an animation starts where a rectancular menu starts from the buttons position on the screen and then moves to the center of the mobile screen while getting bigger and darker. When clicked again (in case user wants to close the menu without pressing any of the buttons available in it) the transition gets reversed back to the width,height and position of the original button and then dissapears via .isvisible=false.

I have multiple buttons and i would like that transition to be done on each one of those buttons. The buttons obviously are in different positions on the screen.

My question is, how can i make my transition/animation code “universal” by taking each buttons attributes (width,height,x and y position) as the starting position (i don’t mind the final position since it is the same for all) of the menu rectancular?

Of course i could do it manually and adjust my code to its button seperatelly but i was thinking to code smart instead of code long.

I am thinking of handling the .id of each button but i am not sure how to do it.

Also i have a second question, is there a command to reverse a transition without making it happen manually by reversing the numbers?

Excuse my English. I tried my best to explain it as accurate and as simple as i can.

  i will try explaining it with code sample again.

Can a moderator please delete this topic?
Thank you

  i will try explaining it with code sample again.

Can a moderator please delete this topic?
Thank you