Unity 4.6 UI do something while button is pressed

How do I make that a scripts function runs while the button is pressed?

You want to capture the on mouse down and keep doing your action until on mouse up.