Change color of dynamic button

I created buttons using this code(from the library)

_root.lines.attachMovie(“Button”, “button”+i+p1+p2,i+p1+p2);
_root.lines[“button”+i+p1+p2]._height = 10;
_root.lines[“button”+i+p1+p2]._width = 10;
_root.lines[“button”+i+p1+p2]._x = posx*;
_root.lines[“button”+i+p1+p2]._y = posy*;
// _root.lines[“button”+i+p1+p2]._RGB=(0x00ff00);
//_root.lines[“button”+i+p1+p2].color= “#176C34”;
_root.lines[“button”+i+p1+p2].backgroundColor = 0xFF0000;
_root.lines[“button”+i+p1+p2].color = 0x0000FF;
_root.lines[“button”+i+p1+p2].textColor = 0xFFFFFF;
I am not able to figure out how I can change the coor of the button dynamically
Can anyone help please?