# Subscribing to Stage events from another DisplayObject

**URL:** <https://forum.kirupa.com/t/subscribing-to-stage-events-from-another-displayobject/241585>\
**Category:** flash\
**Created:** [October 15, 2007, 9:21pm UTC](https://forum.kirupa.com/t/subscribing-to-stage-events-from-another-displayobject/241585 "2007-10-15T21:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dark\_Viper](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dark_viper/32/3568_2.png) [@Dark\_Viper](https://forum.kirupa.com/u/Dark_Viper)\
**Post date:** [October 15, 2007, 9:21pm UTC](https://forum.kirupa.com/t/subscribing-to-stage-events-from-another-displayobject/241585/1 "2007-10-15T21:21:44Z")

</div>

I know that for example you can add an event listener to the stage to listen for when it resizes.

But how would you have a Sprite listen for this event - say for example I had dynamically created objects, I want to be able to listen for when the stage resizes (so I can resize the Sprite for example).

I’ve tried using:

```auto
var myS = new Sprite()
addChild(myS)
myS.stage.addEventListener(Event.RESIZE, resize);
function resize(e) {
   trace(e.currentTarget);
}

```

but it still traces the Stage object - I cant get the object which set up the event listener. Is there any way I can do this?

The eventual workaround will be storing all my dynamically created objects in an array and looping thorough that when the event fires but that seems like an ugly workaround…

thanks in advance.
