2 Replies Latest reply on Nov 19, 2006 6:17 PM by Jesse_Jenkins

    Can't Access ComboBoxes

    mcarlson
      I am unable to control ComboBoxes that are within dynamically created movieclips. Has anyone else experienced this problem?

      I am creating a store which pulls all it's data from a database in Flash 8. There is a scrollpane on the stage which displays the merchandise. The content of this scrollpane is a blank movieclip to which I attach movies for each merchandise item using attachMovie(), based on records returned from the database. Within each of these individual merchitem movieclips are several other movieclips displaying the price, description, etc. along with a combobox so the user can choose a size. For some reason, I am unable to control these comboboxes with actionscript. I know that the path to the merchitem movieclip is correct, as I am able to control all the other movieclips it contains, but not the combobox. I've checked my paths and instance names repeatedly, but cannot seem to control the combobox. I've also tried renaming the combobox instance just in case that might somehow be the problem. Has anyone else experienced this problem? Can anyone offer suggestions?

      Thanks
      - Michael
        • 1. Re: Can't Access ComboBoxes
          Jesse_Jenkins
          MIchael, I've got a very similar problem too. I also have a ScrollPane that contains a MovieClip to which I attach several other MovieClips during runtime, each of which contains a ComboBox. I am unable to get the ComboBoxes to respond properly to my actionscripts.

          At runtime, I attach the MovieClip containing the ComboBox, then I set the dataProvider property for the ComboBox to a list (Array) of data/label value pairs. I then try to set the text property of the ComboBox to a "Please select a value" message and then I add a couple of listeners.

          Iterestingly, setting the dataProvider property works, and the ComboBox displays the proper dropdown list when clicked, but the text property doesn't display and the event handlers don't work. Also, when I try to select one of the values, it doesn't display in the ComboBox's text field. If I trace the ComboBox's text property, it outputs correctly, but doesn't display.

          If I try the same code on a ComboBox that is not dynamically created, it all works perfectly.

          Does anyone know what's up with MIchael and my problems? I'm sure we'd both appreciate the help greatly. I'm pretty stumped.

          Thanks,

          Jesse
          • 2. Re: Can't Access ComboBoxes
            Jesse_Jenkins Level 1
            I've started another thread in the ActionScript forum here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1216120&enterthread=y

            I posted my code there.