Author Topic: Music playing twice on focus  (Read 2894 times)

mklee

  • Member
  • **
  • Posts: 68
  • Karma: +0/-0
    • View Profile
Music playing twice on focus
« on: Sun, Jun 7, 2009 »
Hey Adam, I ran into an interesting bug with the way you're pausing and playing the music on focus lost and found events. Basically, just start a game where you have music and don't have focus on the screen. Click on the screen to regain focus the music will start playing again even if it was already playing. The easiest way to see this bug is to run Mode and have PlayState be the starting state. Just click on the Flash player and you should get the bug.

My simple fix was when you start playing the music have the starting mouse position be -1 instead of 0. That seems to have fixed the error.

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: Music playing twice on focus
« Reply #1 on: Sun, Jun 7, 2009 »
Hey good find, I'll make sure that's fixed up in the next public!