# Global event

**URL:** <https://forum.kirupa.com/t/global-event/229834>\
**Category:** Uncategorized\
**Created:** [June 20, 2007, 3:06pm UTC](https://forum.kirupa.com/t/global-event/229834 "2007-06-20T15:06:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sasxa](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sasxa](https://forum.kirupa.com/u/sasxa)\
**Post date:** [June 20, 2007, 3:06pm UTC](https://forum.kirupa.com/t/global-event/229834/1 "2007-06-20T15:06:54Z")

</div>

is it possible to dispatch some global event that all my objects will ‘hear’? If I use this:

```auto

    public dynamic class Item extends Sprite {
        
        public function Item() {
            this.addEventListener(Event.RESIZE, Global.onResize);
            // Global.onResize function isn't called when browser is resized
        }
    }

```

Global.onResize function isn’t called when browser is resized, but this will work for any object on stage (even if all of them are Sprites and don’t have timeline:

```auto

    public dynamic class Item extends Sprite {
        
        public function Item() {
            this.addEventListener(Event.ENTER_FRAME, Global.onResize);
             // Global.onResize function is called no matter where in Display List object is...
         }
     }
 // I create some kind of structure;
var x = new Item();
stage.addChild(x);
var y = new Item();
x.addChild(y);
// etc....

```

all I can think of is stopping main timeline and manually dispatching enterFrame event - didn’t try this but seams doable… I can’t find a way to dispatch ‘global event’ that all my objects can listen and react to…
