PDA

View Full Version : Sound problem for loaded swf


fido_glc
10-29-2007, 09:55 PM
I have swf2 which I load into swf1. Swf2 has some sound and if I test swf2 alone the sound works but if I load swf2 into swf1 the sound no longer works. Here is the AS I used (placed in the 1st frame of swf2)(I have an imported mp3 sound in the swf2 library with the identifier "mp3_introMusic"):

var introMusic:Sound = new Sound();
introMusic.attachSound("mp3_introMusic");
introMusic.start();

atomic
10-29-2007, 10:36 PM
Add this to your soundObject's definition...

var introMusic:Sound = new Sound(this);
...

It'll work as a charm!

fido_glc
10-29-2007, 11:58 PM
Thanks! It is working.

atomic
10-30-2007, 01:25 AM
Told you! ;)