# Custom Event Please Help

**URL:** <https://forum.kirupa.com/t/custom-event-please-help/258970>\
**Category:** flash\
**Created:** [April 29, 2008, 11:18pm UTC](https://forum.kirupa.com/t/custom-event-please-help/258970 "2008-04-29T23:18:16Z")\
**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, 11:18pm UTC](https://forum.kirupa.com/t/custom-event-please-help/258970/1 "2008-04-29T23:18:16Z")

</div>

Hi all

I have a container sprite on stage. Then I have another sprite containing 5 buttons. I want to display the contents of buttons when they are clicked in the container sprite.

I am using CustomEvent class to dispatch Display obejct i.e is a dynamic textfield containing the contents of the clicked button.

I have a class called GetDisplayObejct() when a button is clicked I am creating an object of GetDisplayObject by passing the contents of the display button as constructor argument.

Inside GetDisplay Object constructor I am running a switch statment to check which button was clicked so if the clicked button was home then what I am doing is creating a home moviclip which is just a dynamice text field and filling this text field with the contents of home. now I am dispatching this DisplayObejct i.e home textfield how can I notify the container on the main time line about this dispatched event so that it can receive the display object and dispaly it on stage using addChild

I hope I am making sense here  
If you want I can send u the code for GetDisplayObject class as well.

Thank you for helping
