Hey ieatcotton... question!

[FONT=Courier New] [/FONT]


for (var object in _root) {
            if (_root[object] instanceof Button || _root[object] instanceof MovieClip) {
                _root[object].enabled = true;
            }
        }

This is good code that you wrote. I added the additional or statement so that it would kill my movieclips too. Would you mind going through and explaining it? I’m not quite sure I understand, but let me try.

for (var object in _root) {

Alright, so, it declares the variable ‘object’ and places it at the ‘_root’ location, and executes the following:

if (_root[object] instanceof Button){

Huh. So if this were alternately written as:

if (_root[object] instanceof Button = true)

would that be the same thing?

_root[object].enabled = true;

Alright, this declares the object’s enabled value to be true… I guess I don’t get how this works. I know what it does, but not how it works.

Sorry. Help?