Using a string to change movie properties

Sorry about the title. I’m not really sure what I’m looking for (that’s probably why I can’t find help)

I have say 50 movie clips on the stage. each has a name like “button1”, “button2” etc and I want to move each one using a for loop instead of hard coding “button1._x = 50”

When I try this it doesn’t work.

var buttonName = "button1";
buttonName._x = 50;

Can anyone steer me in the right direction with this?