# Global event

**URL:** <https://forum.kirupa.com/t/global-event/315446>\
**Category:** Uncategorized\
**Created:** [October 26, 2010, 11:05am UTC](https://forum.kirupa.com/t/global-event/315446 "2010-10-26T11:05:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://forum.kirupa.com/u/jagguy)\
**Post date:** [October 26, 2010, 11:05am UTC](https://forum.kirupa.com/t/global-event/315446/1 "2010-10-26T11:05:07Z")

</div>

If I have a Global Variable

[SIZE=2]Globalvars.vars.noLoaded which is in many classes

How do I create an event where i detect to see if it reaches a certain number.

[SIZE=2]addEventListener(??, Gvariable);

[SIZE=2][/SIZE]**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]private**[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE]**[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function**[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Gvariable(event:Event):[/SIZE]**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]**  
**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]{[/COLOR][/SIZE][/COLOR][/SIZE]**  
**[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff][/COLOR][/SIZE][/COLOR][/SIZE]**  
\*\*[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]}  
\*\*[/COLOR][/SIZE][/COLOR][/SIZE][/SIZE][/SIZE]
