Hey guys,
I’m working on a flash project, that basically works like this:
You have this main menu, where there are objects that need to play different sounds when you move the mouse over them. When you click them, you will be redirected to a sub-screen, which is in fact another .swf file that is loaded into a empyt movieclip. From these sub-screens you need to go back to the main menu.
Now, I have 2 problems that I can’t seem to fix, even though I’ve tried about everything I know about AS2.0
First: playing the sounds when you move the mouse over the objects.
I’ve tried linking the sounds to the movieclips (objects) and calling them in the actions. But it doesn’t work. Now the whole idea is, that you move the mouse over, say the tiger (one of the objects) you hear the tiger roar, when you move the mouse off of the object, the sound stops. For some reason I can’t seem to find any tuts on how to make this work, and my own crappy attempt didn’t work. Maybe you guys know the answer?
Second question:
The loading of the sub-screen swf files works perfectly from the main menu, I use the following script:
var content_mc = _root.createEmptyMovieClip( ‘olifant’, _root.getNextHighestDepth() );
content_mc._x = 0;
content_mc._y = 0;
var loader : MovieClipLoader = new MovieClipLoader();
_root.olifant_btn.onPress = function()
{
_root.content_mc.unloadMovie();
loader.loadClip( ‘Olifant_info.swf’, _root.content_mc );
}
Now, I have a script that should work, because it did so in the past. However, it only works on 2 of the 5 subscreens…
The other 3 screens won’t recognize the button movieclip as being interactive, even though the following piece of scripting is put in its actions:
on( press )
{
var loader : MovieClipLoader = new MovieClipLoader();
_root.content_mc.unloadMovie();
loader.loadClip( 'schoolplaat.swf', _root.content_mc );
}
This last piece of script is put inside a movieclip that acts as a button. The first piece of script is put on a different actions layer, because putting it inside the separate objects will often result in errors.
Maybe somebody also knows a way how to fix this? Or a completely other way to load and unload different swf files.
Hope you guys can help me out!
Thanks in advance