Don't reload my flash menu?

Hi,

I have a flash menu which also includes a submenu. Now with swfobject i have the menu in a webpage.
The problem i have is each time a menuItem is clicked the flash menu reloads and the menuItem with submenu isn’t shown.

How can i solve this??

is the swf in an html, ie you click the swf then go to a different html?

or is the swf the main site container.

[QUOTE=keitai;2328037]Hi,

I have a flash menu which also includes a submenu. Now with swfobject i have the menu in a webpage.
The problem i have is each time a menuItem is clicked the flash menu reloads and the menuItem with submenu isn’t shown.

How can i solve this??[/QUOTE]

Well this is normal, as I supose you tell the browser to change the url with getURL…

To solve this you can put your flash menu in a frame. This is the easiest and ugliest way to do it.

I think the nice way would be to pass a parameter to flash through flashvars, to know which submenu you need to keep open in the new url.

Or do the whole website in flash :smiley:

the swf is in/replace with a div (<div id=“flashMenu”></div>). I am using swfobject for this.

I have found a solution by using SharedObject


//shared object for submenu and initialize
var submenu_so:SharedObject;
submenu_so = SharedObject.getLocal("menu");
etc.

So it remembers if a submenu was opened.

Now i need to implement the same for the menuItem _state

[QUOTE=keitai;2328554]the swf is in/replace with a div (<div id=“flashMenu”></div>). I am using swfobject for this.

I have found a solution by using SharedObject


//shared object for submenu and initialize
var submenu_so:SharedObject;
submenu_so = SharedObject.getLocal("menu");
etc.

So it remembers if a submenu was opened.

Now i need to implement the same for the menuItem _state[/QUOTE]

Hey good idea, didn’t know the sharedobject even existed.

Does the user have to accept something to use the shareobject like when you want to share your webcam or mic?

Good question i don’t see the “accept something” popup screen but you might have a point. i will look into that

hmm, still having issues with this.

Ok, i now how to set the flash menu in a select state ( i went with the addVariable solution), but now i have changed my menu with a little animation and i would like to go the the next page after the animation has finished, but this doesn’t seems to work


function goto() {
	trace("HREF: "+this.gotoURL);
	_root.gotoAndPlay(this.gotoFrame);
	if ((this.gotoURL != undefined) && (endAnime == true)) {
		//getURL(this.gotoURL, "_self");
		trace("Endanime is true");
	}
}

[QUOTE=keitai;2328037]Hi, I have a flash menu which also includes a submenu. Now with swfobject i have the menu in a webpage. The problem i have is each time a menuItem is clicked the flash menu reloads and the menuItem with submenu isn’t shown. How can i solve this??[/QUOTE][QUOTE=Pier25;2328565]Hey good idea, didn’t know the sharedobject even existed. Does the user have to accept something to use the shareobject like when you want to share your webcam or mic?[/QUOTE]

No, there is not a prompt for SharedObjects (flash cookies).

[QUOTE=keitai;2340597]hmm, still having issues with this.

Ok, i now how to set the flash menu in a select state ( i went with the addVariable solution), but now i have changed my menu with a little animation and i would like to go the the next page after the animation has finished, but this doesn’t seems to work[/QUOTE]

Here is an example by Kirupa using SharedObjects for the reload issue, that might help.
http://blog.kirupa.com/?p=55

You can also try passing a FlashVar since your using SWFObject either through so.addVariable (like you mentioned) or by passing a Query String.