Okay I have this problem and I can’t for the life of me figure out what’s wrong. Here is an outline of what is happening:
-
I have a movie clip that contains two components, a combo box and a check box.
-
The combo box has the instance name “comboBox”, and the check box has the instance name “checkBox”.
-
The movie clip is exported for actionscript with the identifier “test”.
-
I run the following code:
[AS]
attached = _root.attachMovie(“test”,“componentContainer”, 1);
attached.comboBox.addItem(“A”, 1);[/AS]
- The item is not added to the combobox and I can’t figure out why.
However, when I run the following code instead:
[AS]
attached = _root.attachMovie(“test”,“componentContainer”, 1);
attached.comboBox._visible = false;[/AS]
The combobox becomes invisible!
I can’t understand why the addItem() function doesn’t work but the _visible property does. Could it be a bug? Or some type of referencing issue? Please, I’d appreciate any help or ideas about why this is happening.