is BinaryCombo a component or a pre-compiled clip? if so, you can't assign selectedIndex until it's been initialized.
BinaryCombo is a movie clip of a single combo box component.
Hmmm, you are saying use a "native" combo box component?
1 person found this helpful
i'm pretty sure you won't want to do that. but, you could do that.
and, i'm pretty sure you don't want to use attachMovie(). are you trying to get a combobox inside an datagrid?
Yes, exactly. Combo box inside a data grid cell(or at least appear to be inside, which is what I have now). I have used cellrenderer before but do not want all rows within the column to have a combo box. Just certain cells. And only when the user clicks on the cell (cellPress).
BTW, I attached the ComboBox component, set the contents with a an array as a dataProvider to the combo.
Works like a charm. Thank you. I knew I was having problems simply because I was trying to set the combo box before the movie had completely initialize but could not figure out how to use a callback to know when done. I tried "onLoad", "onLoadComplete" but no dice. One thing that drives me crazy about Flash is that it gives you enough rope to hang yourself w/o much warning. Documentation is not the greatest and scattered about. I dont know if I am making a simple syntax mistake or way off base when things dont work.
Which brings me to your question. Perhaps attachMovie is not the best solution although it seems to work. I have to admit that I really don't know the difference between attach and load. Perhaps you could "edumate" me?
attachMovie is just pasting the combobox on the grid. you won't have any functionality of the datagrid.
to add the combobox to the datagrid, check: http://www.flash-db.com/Tutorials/cellrenderer/CellRenderer.php
Thanks kglad. I am somewhat familiar with the cellRenderer and have used it on the
datagrid. But as I mentioned earlier, I only recall being able to render the entire column
not certain cells. So the cellRenderer will not work in this case.
use google to search for an as2 tutorial doing exactly what you want.