# TimerEvent - can I pass a variable?

**URL:** <https://forum.kirupa.com/t/timerevent-can-i-pass-a-variable/314201>\
**Category:** flash\
**Created:** [September 21, 2010, 3:33pm UTC](https://forum.kirupa.com/t/timerevent-can-i-pass-a-variable/314201 "2010-09-21T15:33:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [September 21, 2010, 3:33pm UTC](https://forum.kirupa.com/t/timerevent-can-i-pass-a-variable/314201/1 "2010-09-21T15:33:10Z")

</div>

Hi,

I have a TimerEvent set up and want to pass a variable in it. Is this possible without creating my own custom event?

```auto
public function someFunction() {
var apples:int = 200;
var timer:Timer = new Timer(1000, 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, myFunction);
timer.start();

public function myFunction(e:TimerEvent) {
 // now I want to see variable "apples" which is not public
}

```

Anyway to do this? Ty :love\_heart:
