Yes, this is exactly this package. I don't understand. I have no sound until game is started. Here is the complete log taken from terminal: I'm not a JavaScript expert, but you seem to be right. As long as you do not write "var" before curr_music, it is global and should be accessible from everywhere. Could it be possible for the file functions_page_pregame.js to be loaded/parsed *after* loading.js ? What JavaScript engine do you use ? Good luck, if you find the solution I'm curious to know it !