# Custom Buttons/MX Button Component

**URL:** <https://forum.kirupa.com/t/custom-buttons-mx-button-component/66299>\
**Category:** flash\
**Created:** [October 4, 2004, 6:13pm UTC](https://forum.kirupa.com/t/custom-buttons-mx-button-component/66299 "2004-10-04T18:13:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lordnoble](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@lordnoble](https://forum.kirupa.com/u/lordnoble)\
**Post date:** [October 4, 2004, 6:13pm UTC](https://forum.kirupa.com/t/custom-buttons-mx-button-component/66299/1 "2004-10-04T18:13:24Z")

</div>

I’m sure custom buttons act differently than the mx button component, and that is why I’m having this problem…  
I’m working on a project where the actionscript is all inclusive in its own file (I’m trying to be a good OOP programmer in flash here)  
For this project I had a regular mx button within the fla, I gave it an instance name and properly linked it so within the .as, I was able to say:  
[actionscript]  
my\_btn.addEventListener(“click”, myObject\_eh);  
[/actionscript]  
you would click on the button and it would work.  
However I do not want to use the regular mx button so I created my own button, same instance name and everything what is the proper syntax to get this to work in similar fashion  
thanks in advance for your help.  
-noble

---

<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:** [October 4, 2004, 8:51pm UTC](https://forum.kirupa.com/t/custom-buttons-mx-button-component/66299/2 "2004-10-04T20:51:06Z")

</div>

☹ bump
