Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Components Inside Components

Status
Not open for further replies.

Sameal

Programmer
Aug 6, 2001
142
0
0
US
I have built a custom component which I call 'VComboBox'. This component is composed of a single label and an instance of Macromedia's builtin ComboBox 'FComboBoxSymbol'. I named the instance of the FComboBoxSymbol to 'comboObject'.

Now when I drag a copy of my component onto the stage and in ActionScript I use the following code:

_root.myVComboInstance.comboObject.addItem("red", 0);

It works and adds the item into the combo box inside my custom component. However when I dynamically create an instance of my VComboBox it does not work at all, like below:

_root.attachMovie("VComboBox", myNewCombo, depth++);
_root.myNewCombo.comboObject.addItem("red", 0);

The combo appears but however no item is added. And when I click on the arrow for the combo to drop-down nothing happens. I am trying to find out what I am doing wrong? Is there a way to make this work? Also why is my custom component acting completely different based on whether it was created at design-time, or whether it was created dynamically at run-time? Any assistance would be greatly appreciated.
 
Bump bump, someone please give me an angle to start looking elsewhere, two days on this problem and nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top