3 Replies Latest reply on Jan 2, 2012 11:34 PM by DeBoo.Fr

    trace function output to text field?

      How do you send the output of a function to a dynamic text field on the stage instead of the output panel?

      I have used trace(); but that just sends the value to the output panel.

      Any help would be greatly appreciated.

      Best Regards.
        • 1. Re: trace function output to text field?
          derobinson Level 1

          instanceNameOfDynamicTextField.text = "this is my trace statement";

          good luck!
          • 2. Re: trace function output to text field?

            I am also having this problem. My text box has a text property of 'DYNAMIC' and when I assign the instancename.text to a given text value, the box on the stage doesn't show that text. Instead, the text box just appears blank and the text only appears in the output panel.


            This is the code I am using is here (where text_base is the instance name of the-


            text_base.text = "Georgie Porgie blah blah blah"

            remix_btn.addEventListener(MouseEvent.CLICK, remixRhyme);



            function remixRhyme(event:MouseEvent):void{

                      var rhymeCopy:Array = new Array(rhyme.length);

              var randomPos:Number = 0;


                      rhymeCopy = rhyme.slice();

                      text_base.text = "";


                      for (var i:int = 0; i < rhyme.length; i++){

                                     randomPos = int(Math.random() * rhymeCopy.length);

                   text_base.text = text_base.text.concat(" ",rhymeCopy[randomPos]);    

                                     rhymeCopy.splice(randomPos, 1);




            • 3. Re: trace function output to text field?
              DeBoo.Fr Level 1

              Ignore the above... I've discovered the problem and it was something really stupid . The code was fine!