# Dynamic Paths again

**URL:** <https://forum.kirupa.com/t/dynamic-paths-again/121830>\
**Category:** Uncategorized\
**Created:** [September 7, 2004, 7:32pm UTC](https://forum.kirupa.com/t/dynamic-paths-again/121830 "2004-09-07T19:32:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [September 7, 2004, 7:32pm UTC](https://forum.kirupa.com/t/dynamic-paths-again/121830/1 "2004-09-07T19:32:33Z")

</div>

Hi everyone, I am having trouble finding info on how to have a dynamic path, I know I have asked this question before but I think it is different this time, since I am using it in a function…

This is my code, why doesnt it work?

```auto

onClipEvent (load){
	function dropDown(section){
		dropdownmenuTarget = eval("_root.submenu_"+section);
		variableTarget = eval("_root."+section+"menuOver");
		buttonTarget = eval("_root."+section+"_button");
		
		if (buttonTarget.hitTest(_root._xmouse, _root._ymouse, true)) {
			buttonTarget.gotoAndStop(2);
			variableTarget = true;
			trace("on");
			
		} else if (dropdownmenuTarget.hitTest(_root._xmouse, _root._ymouse, true)) {
			buttonTarget.gotoAndStop(2);
			variableTarget = true;
			trace("Sub Menu On");
		} else {
			buttonTarget.gotoAndStop(1);
			variableTarget = false;
			trace("off");
		}
	}
}
onClipEvent (enterFrame) {
	dropDown(services);
}

```

Thank you all for your help!

Ted
