[flashMX] onSoundComplete... help!

i have a sound file on the first frame of my movie. the sound starts playing right off. It is a 7sec story. I want the sound to finish before playing the next frame. This is the code i’m using.

sd = new Sound();
sd.attachSound(“philSound”);
sd.onSoundComplete = function() {
gotoAndPlay(“wow”);
}

It doesn’t work. I have linked the sound file in the library and given it the linkage id of “philSound”
I’d appreciate any help with this.
thanks
maria

you attached the song but you didn’t play it. Of course it won’t detect when it’s finish playing.

[AS]
sd = new Sound();
sd.attachSound(“philSound”);
sd.start(0,1);
sd.onSoundComplete = function() {
gotoAndPlay(“wow”);
}
[/AS]

there ya go

yes it worked!! thankyou thankyou. It’s magic.

lol good, glad it worked, but now you should look into externaly loading sounds. much better option…

ya, he’s right! much better if u use load external files
just change the attachSound to
sd.loadSound(“philSound.mp3”,true)
where the song named philSound in the same folder as the swf