# Calling a Function from a frame

**URL:** <https://forum.kirupa.com/t/calling-a-function-from-a-frame/318644>\
**Category:** flash\
**Created:** [January 26, 2011, 12:38am UTC](https://forum.kirupa.com/t/calling-a-function-from-a-frame/318644 "2011-01-26T00:38:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfx1026](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jfx1026/32/2943_2.png) [@jfx1026](https://forum.kirupa.com/u/jfx1026)\
**Post date:** [January 26, 2011, 12:38am UTC](https://forum.kirupa.com/t/calling-a-function-from-a-frame/318644/1 "2011-01-26T00:38:43Z")

</div>

I have a simple problem. I’m trying to call a function from a frame in an animation.

The function

```auto

function goBack(evt:Event):void {
   gotoAndPlay(this.currentFrame - 100);
}

```

This code lives in frame 1 of my movie. On frame 143 I have this chunk of code.

```auto

goBack();

```

I get an error message saying…  
[COLOR=Red]1136: Incorrect number of arguments. Expected 1.[/COLOR]

What is the reason for this? and how do I fix it?

Thanks.
