|
-
Senior Member
The basic forumula for keeping something centered is:
thing._x = (Stage.width - thing._width)/2;
or, if you've precomputed the center coordinate, you can use:
centerCoordinate = Stage.width/2;
thing._x = centerCoordinate - thing._width/2;
If the text box is contained inside a movieclip, you can use the movieclip width. Otherwise, you can set the textfield to autosize and use the textWidth property instead of thing._width.
The basic forumula for keeping something bottom-aligned is:
thing._y = bottomCoordinate - thing._height;
Again, you can either contain the textfield in a movieclip, and use the movieclip height, or you can set the textfield to autosize and use the textHeight property.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|