A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: output in dynamic text

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    3

    output in dynamic text

    Hey!

    I have a dynamic text box with the instance name "output" and three buttons (btn_A, btn_B, btn_C). What I want is when you press a button the corresponding letter should appear in the text box.
    What I have so far is this:

    Actionscript Code:
    //btn_A:
    on (release) {
        ausgabe.text = "A";
    }

    Works fine, but what do I have to do when I want to spell something, e.g. "ABC"?

    Thanks for your help!

  2. #2
    Junior Member
    Join Date
    Nov 2010
    Posts
    3

    correction

    of course the right AS is:

    Actionscript Code:
    on (release) {
        output.text = "A";
    }

  3. #3
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Actionscript Code:
    on (release) {
        output.text += "A";
    }

  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    3
    Quote Originally Posted by ilike2 View Post
    Actionscript Code:
    on (release) {
        output.text += "A";
    }
    Thanks! That worked out exactly as I wanted it to be! Nice website by the way. Going to read some of your tutorials right now!

  5. #5
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Btw, if you use AS3 there is an appendText() method that does exactly the same.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center