# Issue with gotoAndStop and listener response

**URL:** <https://forum.kirupa.com/t/issue-with-gotoandstop-and-listener-response/315685>\
**Category:** flash\
**Created:** [November 1, 2010, 10:56pm UTC](https://forum.kirupa.com/t/issue-with-gotoandstop-and-listener-response/315685 "2010-11-01T22:56:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danthebeliever](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@danthebeliever](https://forum.kirupa.com/u/danthebeliever)\
**Post date:** [November 1, 2010, 10:56pm UTC](https://forum.kirupa.com/t/issue-with-gotoandstop-and-listener-response/315685/1 "2010-11-01T22:56:56Z")

</div>

Hello,

I am currently writing a little fishing game just for fun. I made a menu screen and now my listeners don’t respond after i gotoAndStop() (unless I click, which is pointless).

Here’s my code:

This is frame 1

```auto
 
stop();
playButton.addEventListener(MouseEvent.CLICK,playOn);
function playOn(event:MouseEvent):void{
 gotoAndStop(2);
}

```

This is frame 2

```auto
 
var harpMoving:Boolean = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN,boatMover);
stage.addEventListener(KeyboardEvent.KEY_UP, harpMover);
stage.addEventListener(Event.ENTER_FRAME, everyFrame);
function boatMover(event:KeyboardEvent):void{
 
 if(event.keyCode == Keyboard.LEFT && Boat.x >= 0 ){
  Boat.x -= 15;
 }
 if(event.keyCode == Keyboard.RIGHT && Boat.x <= 450 ){
  Boat.x += 15;
 }
 if(event.keyCode == Keyboard.DOWN){
  harpMoving = true;
  if(Boat.Harpoon.height >= 290){
   harpMoving = false;
  }
 }
 
 //trace(Boat.x);
 //trace(Boat.Harpoon.height);
}
function harpMover(event:KeyboardEvent):void{
 harpMoving = false;
}
function everyFrame(event:Event):void{
 
 if(harpMoving){
  Boat.Harpoon.height += 10;
 }
 if(!harpMoving && Boat.Harpoon.height >= 1){
  Boat.Harpoon.height -= 10;
 }
}

```

And here’s a link to the .fla incase you want to run it and see:  
[https://bearspace.baylor.edu:443/Dan\_Johnson/public/flashFun/goneFishin’.fla](https://bearspace.baylor.edu:443/Dan_Johnson/public/flashFun/goneFishin%27.fla)
