3 Replies Latest reply on Jun 23, 2006 7:49 AM by MacJr

    Targeting Dynamic Text Box inside moviecip with variable

    MacJr
      Hi,

      How does one target a dynamic text box to change the border color inside of a movie clip? Example below which does not work

      theName = ("answerPrint" + arryCount);
      boxName = ("box" + (arryCount+1));

      _root.pagePrintPartA[theName][boxName].border = true;
      _root.pagePrintPartA[theName][boxName].borderColor = 0x00cc66;
        • 1. Re: Targeting Dynamic Text Box inside moviecip with variable
          DazFaz Level 1
          Works for me:

          arryCount = 1
          //pagePrintPartA 1st box name
          theName = ("answerPrint" + arryCount);//2nd inner box name
          boxName = ("box" + (arryCount+1));//text field name inside of 2nd inner box
          _root.pagePrintPartA[theName][boxName].border = true;
          _root.pagePrintPartA[theName][boxName].borderColor = 0xFF0000;
          • 2. Re: Targeting Dynamic Text Box inside moviecip with variable
            kglad Adobe Community Professional & MVP
            if you code doesn't work then you have a path or instance name issue. make sure arryCount is defined and use trace(_root.pagePrintPartA+" "+_root.pagePrintPartA[theName]+" "+_root.pagePrintPartA[theName][boxName]) to make sure your paths/names are correct.
            • 3. Re: Targeting Dynamic Text Box inside moviecip with variable
              MacJr Level 1
              Thanks for the reinforcement, but I should of indicated what was what:

              theName = ("answerPrint" + arryCount);// Name of Variable inside Dynamic Text Box Inside MovieClip
              boxName = ("box" + (arryCount+1));// Instance Name of Actual Dynamic Text Box Inside MovieClip
              _root.pagePrintPartA[theName][boxName].border = true;
              _root.pagePrintPartA[theName][boxName].borderColor = 0xFF0000;

              By certifying this script you showed me wher I went wron (not seeing the forest from the trees). The last two lines should be:

              _root.pagePrintPartA[boxName].border = true;
              _root.pagePrintPartA[boxName].borderColor = 0xFF0000;

              I was targeting backwards. Thanks alot DazFaz.