# gotoAndPlay not working

**URL:** <https://forum.kirupa.com/t/gotoandplay-not-working/73153>\
**Category:** flash\
**Created:** [December 13, 2004, 9:01pm UTC](https://forum.kirupa.com/t/gotoandplay-not-working/73153 "2004-12-13T21:01:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guggenheimer](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@guggenheimer](https://forum.kirupa.com/u/guggenheimer)\
**Post date:** [December 13, 2004, 9:01pm UTC](https://forum.kirupa.com/t/gotoandplay-not-working/73153/1 "2004-12-13T21:01:38Z")

</div>

I have a custom function with parameter. I’m trying to pass the parameter to the gotoAndPlay as follows.

```
     This is where the function is called...

```

```auto
myButton_btn.onPress = function() {
   myFunction("Apply");
        }

```

```
     This is the function...

```

```auto
myFunction = function (fLabel) {
   trace(fLabel);
   gotoAndPlay(fLabel);
        }

```

Basically “Apply” is a frame label that I’m trying to send the playhead to. The fLabel paramater traces out properly, but the gotoAndPlay doesn’t send the playhead to the appropriate frame label. It sends it to 4 frames before the end. It’s really weird. Even if I add frames to the timeline, it still sends it to 4 before the end. I can get it to work perfectly in a “new” flash document, but not in my existing document. Do I have wrong syntax or is something possibly conflicting?
