Clear All _globals in my movie?

Best way to clear ALL my “_globals” in my movie at one time?

do you want to reset their values or delete them?

try

for(i in _global) delete i

typo ahmed

for(i in _global) delete _global*

:wink:

lol :slight_smile:

this always confuses me… wouldn’t i refer to _global* anyways?

i is just a string of that property name, not the property itself.

_global.bob = 10;

for (i in _global) trace(i); // traces the string “bob”

trying to delete “bob” wouldnt do it :wink: You can delete globals otherwise without the _global reference

_global.bob = 10;
delete bob;
trace(bob); // traces undefined

but the for…in iteration returns strings :slight_smile:

ooh… so basically i would be merely a reference if I’m getting it right… thanks for the ‘clarification’! :slight_smile:

no, you are not merely a reference! You are the MIGHTY AHMED! :beam:

ROFL! :beam: