# Function with parameters

**URL:** <https://forum.kirupa.com/t/function-with-parameters/268101>\
**Category:** Uncategorized\
**Created:** [August 9, 2008, 4:14pm UTC](https://forum.kirupa.com/t/function-with-parameters/268101 "2008-08-09T16:14:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny0085](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@danny0085](https://forum.kirupa.com/u/danny0085)\
**Post date:** [August 9, 2008, 4:14pm UTC](https://forum.kirupa.com/t/function-with-parameters/268101/1 "2008-08-09T16:14:51Z")

</div>

I have this function (it is part of a class)

In interfaz.as

```php

public function sgtePantalla(_stage)
	{
	   _stage.btn_ant.alpha = 1;
	  this.pantallaActual++;
	}

```

In the main.fla

```php
btn_sgte.addEventListener(MouseEvent.CLICK,interfazVit.sgtePantalla(this));

```

Show this Error  
Parameter listener must be non-null.

Thanks !!
