Problem with attachSound and Nested Movie Clips

Hey all,

I’m building a video / audio player that plays provides audio along with a written transcript of the audio along the bottom of the player. I’m having a problem with getting attachSound to work.

Here is the set up:

I have audioplayer.swf which is the main player. It has the start / stop buttons and the majority of the code that interacts with the xml and dynamic content. It has a mc instance clipholder into which the dynamic content is loaded.

The dynamic content is numbers, 01.swf, 02.swf, 03.swf etc.

In 01.swf there is 5 paragraphs, each of which has it’s own text and audio component. The end of paragraph 1 triggers the playing of paragraph 2, and so on.


var audio:Sound = new Sound();
audio.attachSound("audio_1");
audio.start();
audio.onSoundComplete = function() {
    _parent.cliptwo.gotoAndPlay(2);
    _parent.clipone._visible = false;
};

Basically, I"m using onSoundComplete to trigger the next audio section so that the text matches up with the audio.

The attached audio is in the library of 01.swf. It won’t work when loaded into audioplayer.swf. If only works if I copy the attached audio into the library of the audioplayer.swf, which obviously isn’t going to work if it is to be dynamic.

Suggestions??