i got a main movie which should load an external swf with a sound object in it.

The main movie has three layers: Actions, container and preloader.

in the first frame on the action layer i got this code:

loadMovie("music.swf", _root.playerEvent);
_root.loadSound = 1;

in the container level i got an empty movie clip called playerEvent..

and in the first frame of the preloader layer i got a preloader movie clip with this code attached :

onClipEvent (load) {
prog = "LOADING AUDIO";
}
onClipEvent (enterFrame) {
if (_root.loadSound == 1) {
myTotal = _root.playerEvent.getBytesTotal();
myLoaded = _root.playerEvent.getBytesLoaded();
myPercent = Math.floor(myLoaded/myTotal*100);
bar._xscale += (myPercent-bar._xscale)/3;
if (myTotal=myLoaded) {
_root.playerEvent.sound.start();
_root.gotoAndPlay(_root._currentframe+1);
}
}
}

now the preblem is that the sound gets loaded and i can hear it when i test the movie, but it doesnt preload as in the load bar keeps freezed at 0% than it disappears as the timeline jumps to the next frame.

is there something wrong in my code?