4 Replies Latest reply on Sep 17, 2006 10:43 AM by ecir

    Can't write to a TextArea in a dynamically place movie clips.

    ecir
      Hi there I was hoping someone could help me.

      I have a movie clip in the library with a linkage name ‘myPdpBlock’; this movie clip has a TextArea and a CheckBox in it. My question is why is it when I use the code below to put 5 instances on the stage (instBlock0, instBlock1...etc) when I debug the movie I can see all of the 5 instances in the debugger window but the TextArea and CheckBox don’t appear inside each instance even though they have instance names. I want to dynamically place any number of my myPdpBlock movie clips on the stage then feed text into the TextArea from a database.

      Cheers.

      var NumberOfPDPs:Number = 5;

      var i:Number = 0;
      for (i=0; i<5; i++) {
      _root.contentMain.attachMovie("myPdpBlock", "instBlock"+i, i, {_y:i*50});
      if (["instBlock"+i]._width == 0) {
      break;
      }
      }
        • 1. Re: Can't write to a TextArea in a dynamically place movie clips.
          kglad Adobe Community Professional & MVP
          there's no problem with your code. do you see anything on-stage?
          • 2. Re: Can't write to a TextArea in a dynamically place movie clips.
            ecir Level 1
            Hi there - thanks for the quick response. Yes I do get something on the stage: 5 instances of the movie clip from the library one after another. The problem now is that I can't access the TextArea (or checkbox) that is on each of the 5 instances. In the debugger I can see:

            _level0.contentMain.instBlock0
            _level0.contentMain.instBlock1
            _level0.contentMain.instBlock2
            _level0.contentMain.instBlock3
            _level0.contentMain.instBlock4

            …but each of the above instances can't be expanded to view the TextArea (which has an instance name of 'dueBy').

            So visually it is fine I just can’t gain access to all of the TextAreas.

            Someone in another forum mentioned that it has something to do with levels but I thought levels were used if you are bringing in external SWFs. And besides if it does have something to do with levels I don't know how to amend the code to make things work. Any help would be greatly appreciated.

            Cheers.
            • 3. Re: Can't write to a TextArea in a dynamically place movie clips.
              kglad Adobe Community Professional & MVP
              what do you mean by "... can't access the textarea of checkbox"?

              do you mean you can see them but you can't enter text into the textarea or tick the checkbox?
              • 4. Re: Can't write to a TextArea in a dynamically place movie clips.
                ecir Level 1
                Sorry I'm not using the correct terminology.

                Visually I can see the TextAreas and CheckBoxs on the stage but they don't appear in the debugger.
                So I'm left with 5 instances of a movie clip sitting on the stage (each with a TextArea and CheckBox) but I have no way of dynamically entering text into the TextAreas (or gathering info on whether or not a CheckBox has been checked).