A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Changing the content of a text field?

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    17

    Changing the content of a text field?

    Hi, I want to change the content of a text field on the stage but all the tutorials I find explain how to create a textfield in actionscript. What I want to do is create the textfield myself, then access it with actionscript. How can I do this?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    import flash.text.TextField;

    var myText:TextField =new TextField();
    addChild(myText);

    Here you access your textfield and change the text.

    myText.text = "Text";

    If you don't want to create it with AS you draw a textfield and give it a name.
    - The right of the People to create Flash movies shall not be infringed. -

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