# Timer, adding function parameters

**URL:** <https://forum.kirupa.com/t/timer-adding-function-parameters/233004>\
**Category:** flash\
**Created:** [July 19, 2007, 11:46am UTC](https://forum.kirupa.com/t/timer-adding-function-parameters/233004 "2007-07-19T11:46:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sumo/32/1950_2.png) [@sumo](https://forum.kirupa.com/u/sumo)\
**Post date:** [July 19, 2007, 11:46am UTC](https://forum.kirupa.com/t/timer-adding-function-parameters/233004/1 "2007-07-19T11:46:03Z")

</div>

Hi.

Is there any way to add parameters for a function that I’m calling with Timer?

Normally I would this:  
ActionScript Code:  
[FONT=Courier New][LEFT]createBallsCOLOR=#000000[/COLOR];  
[COLOR=#000000] **function** [/COLOR] createBallsCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR]  
[COLOR=#000000]{[/COLOR]  
[COLOR=#808080]_//some code based on num_[/COLOR]  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

With Timer:  
ActionScript Code:  
[FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] myTimer:Timer = [COLOR=#000000] **new** [/COLOR] Timer[COLOR=#000000]([/COLOR][COLOR=#000080]1000[/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];  
myTimer.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]TimerEvent.[COLOR=#000080]TIMER[/COLOR], createBalls[COLOR=#000000])[/COLOR];  
myTimer.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]  
[/FONT]

Where to put the parameter for that function in the Timer? Is it even possible?
