Skip to main content
Participant
July 15, 2014
Question

Game bug, speeding up sprite

  • July 15, 2014
  • 1 reply
  • 248 views

I've been learning flash for about 2 weeks now and I am currently making a game.  I have created wall collision and detection for the walls and enemies and I just patched the last few bugs of the core program so I can start adding gameplay elements but there is one really important bug that I have no idea on how to fix everytime you lose or win the and restart, the player sprite speeds up and it multiplies its speed every time it happens. anybody have any ideas on why this may be?

too much source code so here's the fla:

http://www.mediafire.com/download/dbgtlkhd6pvq4w6/collisionwallgame.fla

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
July 15, 2014

that usually occurs because a setInterval was used and not cleared before another setInterval was used.

tork612Author
Participant
July 15, 2014

I have not used any setintervals as of yet.

kglad
Community Expert
Community Expert
July 15, 2014

there's a small chance setTimeout would cause a similar problem.

if that's not used, someone will need to download your file and troubleshoot it for you.