# How to get event.target

**URL:** <https://forum.kirupa.com/t/how-to-get-event-target/229771>\
**Category:** flash\
**Created:** [June 20, 2007, 4:20am UTC](https://forum.kirupa.com/t/how-to-get-event-target/229771 "2007-06-20T04:20:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pppfeeling](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@pppfeeling](https://forum.kirupa.com/u/pppfeeling)\
**Post date:** [June 20, 2007, 4:20am UTC](https://forum.kirupa.com/t/how-to-get-event-target/229771/1 "2007-06-20T04:20:57Z")

</div>

I made a textfield inside movieclip  
Movieclip name is ‘mc’ and textfield name is ‘txt’

mc  
----txt

I wrote as following code.

* * *

mc.sound = “1”  
mc.addEventListener(“click”,onClick\_mc)  
mc.buttonMode = true

## function onClick\_mc(event) { trace(event.target.sound); }

when I clicked on mc area without txtField area, it worked ok.  
but when I clicked txtfield area which was in movieclip area, it had error…  
Also buttomMode attribute not work in textfield area

Anybody help me…please…
