Groups | Blog | Home
all groups > flash actionscript > april 2007 >

flash actionscript : Menu Question - Just need a little hand


nIvelyx
4/18/2007 11:23:57 PM
Hello All:

Thanks for reading this: What I'm trying to do is make it so that when a user
moves her mouse over my menu, the menu will stay. Attached is my Action Script:

var newLayer = 99;
this.createEmptyMovieClip("menu2_mc", newLayer++);


menu_mc.onRollOver = function () {
menu2_mc.loadMovie("shared.swf");

}

As you can see, this code works, but the new menu2_mc stays on the screen,
even after the mouse is off of the menu2_mc area. How can I get the menu2_mc to
go away once the user moves her mouse out of the menu2_mc region?

I tried to do an .onRollout, but that didn't work, it only made the menu2_mc
go away once the user moved their mouse off of the menu_mc.

Any ideas, thoughts, code snippets, or help will be *GREATLY* appreciated!

Thanks.

if you need me to elaborate on anything, please let me know.
kglad
4/18/2007 11:36:37 PM
kglad
4/19/2007 1:21:55 AM
for example,



var newLayer = 99;
this.createEmptyMovieClip("menu2_mc", newLayer++);

menu_mc.onRollOver = function () {
menu2_mc.loadMovie("shared.swf");
clearInterval(preload);
preloadI=setInterval(preloadF,100);
}

function preloadF(){
bl=menu2_mc.getBytesLoaded();
bt=menu2_mc.getBytesTotal();
if(bl>0&&bl>=bt){
clearInterval(preloadI);
menu2_mc.onRollOut=function(){
menu2_mc.unloadMovie();
}
}
}
AddThis Social Bookmark Button