dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Dynamically re-aligning text fields

  1. #1
    Hi again,

    I have 5 dynamic text fields in a horizontal row - inside a movie clip. I have each text field set to autosize according to the number of characters in it.

    Problem - (& i can foresee this involving j.davis-esque actionscripting organised mayhem)

    Each text field needs to be placed about 5 pixels from the edge of the previous text field edge (right hand side edge), i.e.:

    text field1 (x number of pixels) text field 2 .... etc

    Obviously - this is going to change in terms of the length of each text field! Anybody have any clues at all?

  2. #2
    Senior Member
    Join Date
    May 2002
    Location
    The Great Northwest
    Posts
    380

    Wink not too hard

    I made 2 dynamic text field with autoSize = "Left" placed them on the screen in random places. component names: test1, test2 This worked great.
    Code:
    test2._x = test1._x + test1._width + 5;
    test2._y = test1._y;
    I know you are dynamically loading your text, but this should still work

  3. #3
    GG - great, only one prob so far - the text fields I have, how do I turn them into components?

  4. #4
    Senior Member
    Join Date
    May 2002
    Location
    The Great Northwest
    Posts
    380

    I meant instance names sorry

    I meant instance names not component names. Sorry about the confusion. You could built a component though. Macromedia has a great tutorial. It might even be in the help file!

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