The simpler the solution the better.
02-22-2013, 05:03 AM
Your fadeText function is a bit dodgy but can still work and you confirm it works once. Do you realise that when you call the fadeText function it sets the Fade function to do its stuff every 20ms till done. While that is happening the other functions in updateBox are being called and maybe they do something to interfere with the process. Put it at the bottom of the list in the updateBox function.
To help yourself understand what is going on internally use the browser web development tools to monitor what is going on. As an example what do you expect would be in each of the variables of the fadeText function before you set the fade function in motion? Once you have that list, check the actual values using the tools aforementioned.