On roll over I want an mc to expand smoothly, and then shrink on roll off back to it'

i used to have a cool component that helped me to do this. I’d prefer to do it with code, and have easing involved, rather than on the timeline.
Do you know of an efficient way to achieve this rather basic effect?
I’d ideally like to control the speed with a variable perhaps.
thanks.