Howdy all. I tried to bump an old thread with a new question but it got buried too quickly so I thought I’d try a new thread with a (now) old question instead! :beam:
I am using this nifty little function written by Kode:
var buttons = [_root.btn1, _root.btn2, ..., _root.anotherButton];
buttonsEnabled = function (value) {
for (var prop in buttons) {
buttons[prop].enabled = value;
}
};
// enable buttons
buttonsEnabled(true);
// disable buttons
buttonsEnabled(false);
My button array is on my main timeline. On the main stage is a button that when pressed calls the function to disable the array (buttonsEnabled(false)). This seems to work - although when I do trace(buttonsEnabled) it just says “type Function” . . . ? :h:
Anyway, it disables the button.
Now I do this so that I can load a content MC on top of the stage (and the buttons there) and load in an external swf. The content MC has a close button on it. When you click the close button I want the buttons on the main stage to be enabled so I call the function again (buttonsEnabled(true)). But it doesn’t work at all. And a trace returns undefined.
Is this a scope problem?
Thanks for any help!
:hr: