Skip navigation
Opaque17
Currently Being Moderated

trace function output to text field?

Feb 26, 2007 2:08 PM

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.
 
Replies
  • Currently Being Moderated
    Mar 2, 2007 5:18 PM   in reply to Opaque17
    try:

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

    good luck!
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 2, 2012 5:40 AM   in reply to derobinson

    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);

      }

    trace(text_base.text)

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 2, 2012 11:34 PM   in reply to DeBoo.Fr

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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)