Hello List,
Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC.

My code:
var comboListen = new Object();
                comboListen.change = function(evt_obj:Object) {
                        trace(evt_obj.selectedIndex);
                        var selectNum:Number = evt_obj.selectedIndex;
                        if (selectNum <= 1) {
                                var pic = picturesArry[thumbHolder.ID][0];
                                thumbHolder["picture_box"].loadMovie(pic,0);
                                thumbHolder.LoadVars(pic);
                        } else {
                                var pic = 
picturesArry[thumbHolder.ID][selectNum];
                                thumbHolder["picture_box"].loadMovie(pic,0);
                                thumbHolder.LoadVars(pic);
                        }
                };
                colorBox.addEventListener("change",comboListen);

thumbHolder = main MC that holds the picture and the comboBox
["picture_box"] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with.

FYI, by the time I get to using the listener, ["picture_box"] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and ["picture_box"] are dynamically loaded onto the stage at run time.

How do I get colorBox's selection to change the picture in thumbHolder ["picture_box"]?

Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy.
Is there something I need to import to control the comboBox?

I have
import mx.control.ComboBox;
already imported, do I need it?

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to