[AS] dragger.onPress=function()

Hello,
I am currently working on the Slider Bars tutorial at http://www.kirupa.com/developer/mx/slider.htm . I got dragger to work, I just want to better understand the dragger.onPress=function() part.

With a normal function you have:
function hello(){
trace(“hello”);
}

Then when I wanted to run the function, I would use:
hello();

Ok so if dragger is pressed (onPress) then it creates a function, right? So how do you run the function? Or is the function running as I’m pressing dragger?

I hope you can understand my question.

Thanks