A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: changing text in a text box

  1. #1
    Hello World!
    Join Date
    Nov 2003
    Location
    Egypt
    Posts
    41

    changing text in a text box

    Hello people

    I have a simple question.

    How can change text in a text box each time i click a different button?

    an example also would be helpful

    thankx for your help

  2. #2
    Senior Member
    Join Date
    Nov 2003
    Location
    Ashkelon,Israel
    Posts
    255
    what you meen?
    you have few buttons and one text box?
    or what?expline more!
    PURA VIDA

  3. #3
    Hello World!
    Join Date
    Nov 2003
    Location
    Egypt
    Posts
    41

    thankx

    thankx for replying !

    yes , it is one text box and 5 buttons .. the text inside the text box should change depending on the button that i click

  4. #4
    Senior Member
    Join Date
    Nov 2003
    Location
    Ashkelon,Israel
    Posts
    255
    code
    content_arr = new Array("This is the text for the button 0 your text",
    "This is the text for the button 1 your text",
    "This is the text for the button 2 your text",
    "This is the text for the button 3 your text",
    "This is the text for the button 4 your text");

    for (i = 0 ; i < content_arr.length ; i++)
    {
    _level0["func" + i + "_btn"].num = i;
    _level0["func" + i + "_btn"].onPress = function ()
    {
    content_txt.text = content_arr[this.num];
    }
    }
    PURA VIDA

  5. #5
    Hello World!
    Join Date
    Nov 2003
    Location
    Egypt
    Posts
    41

    ???

    the code is nice !

    but can you explain what do u want to do a little? i'm lost here

    please explain your code and idea

  6. #6
    Senior Member
    Join Date
    Nov 2003
    Location
    Ashkelon,Israel
    Posts
    255
    this is a fla that i got froum,the other day!
    Attached Files Attached Files
    PURA VIDA

  7. #7
    Hello World!
    Join Date
    Nov 2003
    Location
    Egypt
    Posts
    41

    nice

    it worked nice

    but .. i am sorry i am not into actionscript a lot .. i just have some few questions

    what is _level10? u mean the base ?

    when does this code excutes? it is just there on a layer

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