dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Formatting Dynamic Text [F8]

  1. #1
    Member
    Join Date
    Mar 2001
    Posts
    32

    Formatting Dynamic Text [F8]

    I have a project with multiple instances of a movie clip on the timeline. I am interested to know how you would dynamically add text to the to the movie clips so that the text was centered vertically on each object?

    For the record...
    Yes, this is related to my last post. The lack of replies suggested that my solution was so cludgy that no one could figure out what I was doing. :^) Consequently, I am asking for a completely new method that would help me a) accomplish the task and b) help me be a better programmer.

    Thanks!

  2. #2
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    PHP Code:
    var format:TextFormat = new TextFormat();
    format.align "center";
    yourTxtField.setTextFormat(format);
    yourTxtField.text="this is centered"

  3. #3
    Member
    Join Date
    Mar 2001
    Posts
    32
    Thanks for the quick reply. However, my issue is trying to center the text vertically.

  4. #4
    Member
    Join Date
    Sep 2007
    Posts
    48
    Code:
    yourTxtField._y = Stage.height/2;

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