Hi all,
I’m really at loss here (6 hrs straight and liters of coffee and i cannot indetify the problem) and I would REALLY really appreciate your help-- A LOT sigh
Here’s the scenario:
I’m tying to build my new flash site as modular as possible (learning from past mistakes). Among others, I’m importing a MC containing all menu functions onto the main timeline via loadMovie().
This mcMenu.swf also contains the sound effects for the menu which are being attached via actionscript in the first frame:
[font=Courier New]
[color=SeaGreen][color=Blue]// attach sounds: soundID and linkageID are identical[/color]
function sndAttach(id,vol) {
this.createEmptyMovieClip(id+“Mc”,this.getNextHighestDepth());
this[id] = new Sound(id+“Mc”);
this[id].attachSound(id);
this[id].setVolume(vol);
}
sndAttach(“sndOver”,70);
sndAttach(“sndClick”,20);
[color=Blue]// button behaviors[/color]
menu_button.onRollOver = function() { sndOver.start() }
menu_button.onRelease = function() { sndClick.start() }[/color][/font]
[color=Black]When tested by itself, this .swf runs just fine-- all sounds are being played when the respective button handler is called (no linkage mistakes). So far so good.
NOW comes the problem: When I import this .swf into my main movie via [font=Courier New][color=SeaGreen]loadMovie(mcMenu.swf);[/color][/font] the menu works as it should [/color][color=Black]within the main movie [/color][color=Black]EXCEPT for the menu button sounds! But since the menu-movieclip is a closed module (with all sounds inside and working 100% when tested as standalone), WHY ON EARTH are the sounds gone when this module is imported into another movie?? So much for modules WITH sound?!
Anybody? My brain is fried.
Thanks so much for any help!
[/color]