# LIB or Sen Please Help... XML Navigation

**URL:** https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792
**Category:** flash
**Created:** [August 18, 2003, 5:25pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792 "2003-08-18T17:25:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 5:25pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/1 "2003-08-18T17:25:45Z")

</div>

Guys, I promise this is my last question regarding the XML nav you guys made

I want the navigation to expand onRollOver not onRelease.

When i change it it doesn’t work, why not? This seems so simple but yet it won’t work

here’s some code

```auto

						mySubButton.onRollOver = function() {
							getURL(this.myUrl, this.myTarget);
							trace(this.buttonLabel.text+" : "+this.myURL);
						}
						mySubButton.onRollOver = function() { this.glare.play(); }
						mySubButton._x = this._x;
						mySubButton._y = this._y + vSpacing*(j+1);
						mySubButton.arrow.swapDepths(0);
						mySubButton.arrow.removeMovieClip();
					}
				}
				
				myButton.onRollOver = function() {
					if (mainMenu.currentSubMenu != this){
						mainMenu.currentSubMenu.arrow.setToRotateTo(0);
						mainMenu.currentSubMenu = this;

						var currButton = this;
						mainMenu.onClosedMenu = function(){ 
							this.offset = vSpacing * currButton.subMenus;
							this.dropStart = currButton.ID;
							this.currentSubMenu.createSubMenu();
							currButton.arrow.setToRotateTo(90);
							}
						mainMenu.offset = 0; 
					}else{
						mainMenu.currentSubMenu = null;
						this.arrow.setToRotateTo(0);
						mainMenu.offset = 0; 
					}
				}
			}else{
				myButton.myUrl = menuItem*.attributes.URL;
				myButton.myTarget = menuItem*.attributes.TARGET;

				myButton.onRollOver = function() {
					getURL(this.myUrl, this.myTarget);
					trace(this.buttonLabel.text+" : "+this.myURL);
				}
				myButton.arrow.swapDepths(0);
				myButton.arrow.removeMovieClip();
			}
			
			myButton.onRollOver = function() { this.glare.play(); }
			myButton._x = 3
			myButton._y = -2; // position
			myButton.homePosition = myButton._y += vSpacing*i;
		}

```

Thank you in advance

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 5:35pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/2 "2003-08-18T17:35:05Z")

</div>

Look at your script, you have 2 onRollOver handlers.

So the second one that gets called (this.glare.play()) overwrites the first one (produce menu code)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 5:48pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/3 "2003-08-18T17:48:53Z")

</div>

lol woah, did i miss that part in Flash 101? why can’t i use the same handlers more than once?

anyway thanks a lot man.

_Digitalosophy Tip’s Hat_

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 7:21pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/4 "2003-08-18T19:21:52Z")

</div>

Dynamic event handlers are functions, so when you define what happens in 1 function and then create a new function with the same name it overwrites the original function to make way for the new function.

Example…

[AS]function test() {  
trace(2);  
}  
test();  
//returns 2[/AS] but [AS]function test() {  
trace(2);  
}  
function test() {  
trace(9);  
}  
test();  
//returns 9[/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 7:23pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/5 "2003-08-18T19:23:14Z")

</div>

it’s as if i told you “when i clap, go left and right”  
…what will you do? 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 7:32pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/6 "2003-08-18T19:32:12Z")

</div>

> \*Originally posted by eyezberg \*  
> \*\*it’s as if i told you “when i clap, go left and right”  
> …what will you do? 😉 \*\*

LOL… actually that is an awesome example!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 18, 2003, 8:05pm UTC](https://forum.kirupa.com/t/lib-or-sen-please-help-xml-navigation/28792/7 "2003-08-18T20:05:39Z")

</div>

actually that was a great example. thanks a lot guys, this is why i love kirupa 🙂
