Can't preload and sync animation and music


This is what I have:

  1. A preloader in frame 1 which loads the animation and background music (dynamic mp3), all located in frame 2 (frame label name is “intro”)

This is what I would like to do:

  1. Play the animation and background music together (dynamic mp3) once the preloading is complete.

My problem is this:

  1. My animation starts playing before the dynamic mp3 is loaded.


How can I get the animation and the dynamic mp3 to play at the same time? Or how can I make sure the dynamic mp3 is preloaded before the animation starts playing?


  1. Currently the preloader is in the 1st frame of my movie.

onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)100)).25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {

  1. My dynamic mp3 movie clip is in the 2nd frame. The frame is called “intro” and the code below is on the movieclip called “bkgmusic”.

onClipEvent (load) {
firstSound=new Sound();
firstSound.loadSound(“music.mp3”, true);
firstSound.onSoundComplete = function() {
this.loadSound(“music.mp3”, true);