# Custom Buttons/MX Button Component

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