# Using Custom Event to Dispatch DisplayObject

**URL:** <https://forum.kirupa.com/t/using-custom-event-to-dispatch-displayobject/258859>\
**Category:** flash\
**Created:** [April 29, 2008, 12:24am UTC](https://forum.kirupa.com/t/using-custom-event-to-dispatch-displayobject/258859 "2008-04-29T00:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnan794](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@adnan794](https://forum.kirupa.com/u/adnan794)\
**Post date:** [April 29, 2008, 12:24am UTC](https://forum.kirupa.com/t/using-custom-event-to-dispatch-displayobject/258859/1 "2008-04-29T00:24:10Z")

</div>

Hi all

I have one class called buttons when user clicks on a specific button I want to dispatch either a movie clip or a textfield event with the contents of the clicked button inside.

now I can dispatch the textfield fine. In the maintimeline I am running an event handler that add that event object text field in this case to the stage or display list addChild(e.dataValue);

But nothing is being displayed on stage but if i trace(e.dataValue); then it traces [Object TextField]. Please help if possible

Thanks
