How can I fade color and tween shape with code?

Hey all, this site is the best…

I have a movie clip which contains a rectangle. When a user clicks a button, I want to be able to change the size of the rectangle and fade the color of the rectangle to another color over a few seconds. I’m wondering how to do this with code.

I know how to move things over time with code, so I imagine it’s similar with color and shape, but any help would be fantastic - thanks!