# Don't reload my flash menu?

**URL:** https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719
**Category:** flash
**Created:** [May 19, 2008, 9:15am UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719 "2008-05-19T09:15:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)
#### Post date: [May 19, 2008, 9:15am UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/1 "2008-05-19T09:15:13Z")

</div>

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??

---

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [May 19, 2008, 10:03am UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/2 "2008-05-19T10:03:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)
#### Post date: [May 19, 2008, 2:09pm UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/3 "2008-05-19T14:09:26Z")

</div>

[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 😃

---

<div class="post-metadata">

### Author: ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)
#### Post date: [May 20, 2008, 11:55am UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/4 "2008-05-20T11:55:53Z")

</div>

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

```auto

//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

---

<div class="post-metadata">

### Author: ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)
#### Post date: [May 20, 2008, 12:52pm UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/5 "2008-05-20T12:52:23Z")

</div>

[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

```auto

//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?

---

<div class="post-metadata">

### Author: ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)
#### Post date: [May 20, 2008, 2:14pm UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/6 "2008-05-20T14:14:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)
#### Post date: [June 11, 2008, 9:45am UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/7 "2008-06-11T09:45:47Z")

</div>

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

```auto

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

```

---

<div class="post-metadata">

### Author: ![prg9](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@prg9](https://forum.kirupa.com/u/prg9)
#### Post date: [June 11, 2008, 12:12pm UTC](https://forum.kirupa.com/t/dont-reload-my-flash-menu/260719/8 "2008-06-11T12:12:50Z")

</div>

[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](http://blog.kirupa.com/?p=55)

> **[XML Navigation Menu that Remembers Expanded Nodes](https://www.kirupa.com/forum/showthread.php?t=246980)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

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