# Drop Down Menu problem

**URL:** <https://forum.kirupa.com/t/drop-down-menu-problem/63549>\
**Category:** Uncategorized\
**Created:** [September 7, 2004, 9:30pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549 "2004-09-07T21:30:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![byersj21](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@byersj21](https://forum.kirupa.com/u/byersj21)\
**Post date:** [September 7, 2004, 9:30pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/1 "2004-09-07T21:30:11Z")

</div>

First off, I’d like to thank Ken Brown for this handy tutorial.  
[http://www.flashkit.com/tutorials/Actionscripting/How\_to\_m-Ken\_Brow-997/index.php](http://www.flashkit.com/tutorials/Actionscripting/How_to_m-Ken_Brow-997/index.php)

The code used here is:  
[color=red]onClipEvent(load){  
//is the cursor over the movie clip  
previouslyOver=false;  
}  
onClipEvent(enterFrame){  
currentlyOver=this.hitTest(\_root.\_xmouse,\_root.\_ymouse,true);  
//if there is a change, go to another frame  
if(!previouslyOver and currentlyOver){  
previouslyOver=true;  
this.gotoAndStop(“on”);  
} else if (previouslyOver and !currentlyOver){  
previouslyOver=false;  
this.gotoAndStop(“off”);  
}  
}[/color]  
[color=red][color=black][/color][/color]  
[color=red][color=black]Ok, this code works fine. I’ve attached this to a movie clip which contains a button within it. The way it works is when you rollover it, the dropdown comes out. So up to this point, everything is fine and dandy until I accidently click the trigger movieclip button (the one that drops the menu down)… and then the button quits working. Now I could disable the hand when scrolling over, but if they still click on accident, the button quits working until you refresh the screen. My only solution is to make it only come down when clicked instead of rolling over it. I’m hoping there is a way to refresh it if someone does click on it, but not sure how to do that?[/color][/color]  
[color=red][color=#000000]Any help is GREATLY appreciated. :-/ [/color][/color]  
[color=red][color=#000000][/color][/color]  
[color=red][color=darkorange]Note: If anyone else does use this code and puts buttons inside of the movie clip and wants to load a swf into a targeted movieclip, be sure to [/color][/color][color=red][color=darkorange]add [/color][/color]  
[color=red][color=darkorange]\_root.(targetmovieclip) so that it’ll function properly. I’m still getting use to actionscript and figured for any newbies, you’d probably run across the same problem.[/color]

[/color]

---

<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:** [September 8, 2004, 3:04pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/2 "2004-09-08T15:04:48Z")

</div>

Well… how about this… how do you make a movieclip or button inside a movieclip not clickable… ?? I do have to have the hidden state there for rollover reasons… but how can you make that nonclickable? All I want is to rollover say the portfolio button… then just be able to click lets say… animations, websites, and designs buttons… (I already have that working as far as clicking the sub buttons)… I just don’t want my button to be disabled and the user have to refresh the page to fix it. ANY IDEAS???:book:

---

<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:** [September 8, 2004, 3:14pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/3 "2004-09-08T15:14:20Z")

</div>

> [@byersj21](#):
>
> Well… how about this… how do you make a movieclip or button inside a movieclip not clickable… ??

mybutton.enabled = false;

:hr:

---

<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:** [September 8, 2004, 4:25pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/4 "2004-09-08T16:25:27Z")

</div>

thanks man… I’ll give that a try later. If it doesn’t work, it at least gives me an idea…

---

<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:** [September 8, 2004, 4:36pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/5 "2004-09-08T16:36:16Z")

</div>

your welcome :hr:

---

<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:** [September 9, 2004, 1:08am UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/6 "2004-09-09T01:08:18Z")

</div>

😊 I double checked my buttons… and had accidently left some code in there to disable my button after clicking on it… MY BAD!!!

---

<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:** [September 20, 2004, 2:50pm UTC](https://forum.kirupa.com/t/drop-down-menu-problem/63549/7 "2004-09-20T14:50:57Z")

</div>

Great tut.
