In this, mcPause is my pause button. mcPaddle is the paddle, and mcBall is the ball. Both of those have event listeners that move them.
When I try to pause, nothing happens. If I change the mcPause listener to a MOUSE_DOWN the pause works, but only if you hold down over it, rather than clicking it.
If it's possible, I'd also like to have "" on the keyboard pause/unpause it.
If anyone can give me help with either of these, I'd be much obliged.
What's the code for resuming? So far I can't see that much wrong with your code - if that's all I can't think of a reason why it shouldn't work. Which is why I'm guessing you somehow fire the resume function pretty soon after. You might want to check with a few traces here and there. What you could do in any case, to prevent any errors, is removing the event listener you set earlier for the pause in that function (function pauseGame -> removeEventListener(MouseEvent.MOUSE_DOWN etc)
Do you by any chance use the MouseEvent.MOUSE_UP as resume? That would cause your problems. If you did what I wrote earlier in this post, you could use the pause function to add a mouse down listener that fires the resume. This way you can prevent firing these functions when you don't want them to!
Alright, so I got it to work. Basically, I did an if statement; only problem is that you do have to click on the actual button instead of anywhere on screen. I'll post the code Monday; it's at my school so I don't have access.