# Button.onRollOver = function (argument)

**URL:** <https://forum.kirupa.com/t/button-onrollover-function-argument/258200>\
**Category:** Uncategorized\
**Created:** [April 22, 2008, 12:15am UTC](https://forum.kirupa.com/t/button-onrollover-function-argument/258200 "2008-04-22T00:15:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prey](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@prey](https://forum.kirupa.com/u/prey)\
**Post date:** [April 22, 2008, 12:15am UTC](https://forum.kirupa.com/t/button-onrollover-function-argument/258200/1 "2008-04-22T00:15:56Z")

</div>

hello,

is there a way to pass an argument to a function that’s being assigned to a button event.

i have a function

```auto

function scroll(direction,speed)
{
//
}

thumb.scrollUPslow.onRollOver = scroll(1,1);

```

that doesn’t work. is there a way around this problem?

thank you
