# Custom Button class

**URL:** <https://forum.kirupa.com/t/custom-button-class/298857>\
**Category:** Uncategorized\
**Created:** [October 26, 2009, 1:44pm UTC](https://forum.kirupa.com/t/custom-button-class/298857 "2009-10-26T13:44:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xalexas](https://avatars.discourse-cdn.com/v4/letter/x/a698b9/32.png) [@xalexas](https://forum.kirupa.com/u/xalexas)\
**Post date:** [October 26, 2009, 1:44pm UTC](https://forum.kirupa.com/t/custom-button-class/298857/1 "2009-10-26T13:44:20Z")

</div>

I have found this fine example for multilanguage choice:  
[http://www.log2e.com/tutorials/flash/as20\_multilanguageapp/index.html](http://www.log2e.com/tutorials/flash/as20_multilanguageapp/index.html)

I have changed initLanguageSelector() to this:

private function initLanguageSelector(): Void {

```
    _main_mc.en_mc.addEventListener("click", Delegate.create(this, changeLanguage));
    _main_mc.en_mc.data = "en";
    
    _main_mc.de_mc.addEventListener("click", Delegate.create(this, changeLanguage));
    _main_mc.de_mc.data = "de";
    

    _main_mc.en_mc.dispatchEvent({type:"click"});
    
}

```

It works OK with button component but I need it to work with simple movieclip or button.  
How to do this?
