Music out of sync in kiddie DJ game

I made this mixing game for kids: http://zrreintjes.fatcow.com/flash/game.html
(Hit the boat and it starts) It’s based on a piano track which loops 7 times. Meanwhile you add instruments by dragging the icons onto the boat. But it won’t play in sync, even though the tracks are millisecond-tailored to fit the frames exactly. The timeline is subdivided into eight parts per 1 piano-loop, think of them as 8 bars, meant so shorter sounds can be added on the fly, instead of them only joining in at the end of each piano-loop (16 sec each). But at the end of each of the 7 piano-loops, the sound stops for a split second. Maybe due to the length of the script checking which intruments are loaded. I’ve not yet tried to add the other sounds on the fly as this would only make the ‘hitches’ more frequent. At the end of the game there’s a demo so you can hear what it could sound like (if it worked properly). Sounds cool, huh? The game doesn’t. It should be simple, and I suspect the whole thing will have to be built from scratch. The question is how. Anybody got any bright ideas, or maybe an example to get me going?