-
I have a movie "mixer.swf". In the movie I have a MC 'volume' that (onClipEvent(load)) attaches a linked sound 'sound1'.
... so far so good
Then I load 'sound2.swf' that hold a linked 'sound2' into _level2.
On a button I wish to attach 'sound2' to the mc 'volume' but I can't seem to get it right!
onClipEvent (mouseDown) {
volume.objSound = new Sound("sound1");
volume.objSound.setVolume(100);
volume.objSound.attachSound("_level2.sound2");
volume.objSound.start(0, 1);
}
What am I doing wrong ... ?
Help will be greatly appreciated
/POD
-
Hi podenphant...I'm a little confused on what you're trying to do when you say you're trying to "attach 'sound2' to mc 'volume'"...
Anyway, I would approach it like this, I think...
In your "sound2.swf" where you have linked 'sound2'...go ahead and create your Sound Object on the main timeline of "sound2.swf"...
objSound = new Sound(this);
objSound.attachSound("sound2");
...the important thing in the code above is using "this" in the Sound constructor...it is necessary to do it this way whenever you use loadMovie on a Sound Object...
...then after you load it into _level2 of "mixer.swf" you can call it on a button or onClipEvent or frame action by...
_level2.objSound.start(0,1);
...or set volume...
_level2.objSound.setVolume(0);
Hope that's what you're looking for...
-pigghost-