transition.moveBy not working

I have the need to use transition.moveBy on my app when I press a button, but when I call it I get

Attempt to call field ‘moveBy’ (a nil value)

I have even tried to copy the sample code from the documentation, which is inside the function randomFunction :

local function randomFunction( ... ) square = display.newRect( 0, 0, 100, 100 ) transition.moveBy( square, { x=100, y=100, time=2000 } ) end randomBtn = widget.newButton{ labelColor = { default={255}, over={128} }, width=57, height=55, onRelease = randomFunction }  

any suggestions? thx