# Disabling buttons

**URL:** <https://forum.kirupa.com/t/disabling-buttons/25036>\
**Category:** flash\
**Created:** [July 8, 2003, 8:00pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036 "2003-07-08T20:00:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [July 8, 2003, 8:00pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036/1 "2003-07-08T20:00:33Z")

</div>

I was wondering how you would disable buttons. Iknow there is the code:

movieclip.enabled = false

but this doesn’t seem to stop buttons from doing someting when the mouse is rolled over it.

I have 2 movieclips; both with actions which execute on rollover. They also lie on top of each other (but not entirely). When i rollover the top movieclip, the bottom one executes its rollover actions too. I was wondering how to stop this. thx

---

<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:** [July 8, 2003, 8:35pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036/2 "2003-07-08T20:35:03Z")

</div>

I am not sure I understand, can you post an example file?

.enabled works for buttons and movie clips.

---

<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:** [July 8, 2003, 8:45pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036/3 "2003-07-08T20:45:36Z")

</div>

ok heres an example…

You will see there are 2 circles which get bigger when you rollover them. If you rollover the point where the green overlaps the grey circle, BOTH circles will get bigger.

I want to stop the grey circle from expanding when you rollOver any part of the green circle. Is that possible? thx

---

<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:** [July 8, 2003, 8:51pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036/4 "2003-07-08T20:51:53Z")

</div>

It is because you are using hitTest(), your mouse is in the hit area of the clip so it registers it as a hit.

You can use on handlers on movie clips in Flash MX, so you can do this…

[AS]onClipEvent (load) {  
this.\_width = 50;  
}  
on (rollOver) {  
this.onEnterFrame = function() {  
this.\_width += 20;  
};  
}  
on (rollOut) {  
delete this.onEnterFrame;  
}[/AS]

On both circles.

---

<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:** [July 8, 2003, 8:57pm UTC](https://forum.kirupa.com/t/disabling-buttons/25036/5 "2003-07-08T20:57:04Z")

</div>

oh ok, i thought of that too, but i thought hitTest had the two options: entire shape and bounding box which would do some other stuff. Anyways thx
