I’m having some problems trying to figure something out in flash and can’t find out what the best way is to do this.
I want to first load in my menu of my website with loadMovie and then let the menu control the rest of the website. But don’t know how to do this.
This is what i got now:
loadMovie("menu.swf", "menu");
var someListener:Object = new Object();
someListener.onMouseUp = function () {
trace("active menuitem = " + menu.curMenu);
if (menu.curMenu == "about") {
loadMovie("main.swf", "main");
}
};
Mouse.addListener(someListener);
In my menu swf i set curMenu to some value when a button is pressed. The only problem seems to be that there is an delay that is to big. So when i pres a button in my menu swf, the main swf checks the value and it hasen’t changed yet. If i check half a sec. later. Then there it’s changed!
Is there some other way to do this? Or do i have to get some sort of sleeptimer in my current code?!?
Thanks in advance.