Custom Event Please Help

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