1 Reply Latest reply on Sep 4, 2007 12:09 PM by stephan.k

    comboBox attachMovie Problem

    stephan.k
      Hi Forum

      I've made a stripped down version of my comboBox movie to debug the problem. This is what it looks like now:

      ///////////// _ROOT //////////////////////////////////////////////////
      on the root I have two movieClips: b1 and b2
      Script:
      b1.onRelease = function(){
      _root.attachMovie("screen1","screen",1);}

      b2.onRelease = function(){
      _root.attachMovie("screen2","screen",1);}



      ///////////// Screen1 (in the library) //////////////////////////////////////////////////
      Screen 1 movieclip has one comboBox instance name combo.
      Script:
      combo.addItem({data:1, label:"One"});
      combo.addItem({data:2, label:"Two"});


      ///////////// Screen2 (in the library) //////////////////////////////////////////////////
      Screen 2 movieclip has one comboBox instance name combo.
      Script:
      combo.addItem({data:1, label:"three"});
      combo.addItem({data:2, label:"four"});


      The Bug:
      I click on b1 and the comboBox appears as it should. the label of the comboBox is one. When I click either on b1 or b2 after that, the label of the comboBoxes disappear. The list however of the comboBox still contains the two entires ("one" "two" or "three" "four") when I click on the drop down arrow.

      Any ideas where the bug lies? And what can be done to resolve this issue?

      any insight or leads much appreciated.

      Thank you !

      Cheers

      Stephank

        • 1. Re: comboBox attachMovie Problem
          stephan.k Level 1
          This is very interesting!

          I have added a third button on the root (b3) which loads just an empty movieClip onto the stage.

          If I always first click b3 before attaching a comboBox (screen1 or 2) the combos work. If I attach screen 1 or 2 right after each other the combos break until I click on b3.

          It seems like attaching movieclips which contain comboBoxes need to be "reset" by attaching an empty movieClip before attaching another movieClip which also contains a comboBox.

          Could any comboBox / Components guru explain this phenomenon? I'm very curious.

          Thanks

          stephank