# How To Find Pixel Width Of A Dynamically Loaded Text Box

**URL:** https://forum.kirupa.com/t/how-to-find-pixel-width-of-a-dynamically-loaded-text-box/249050
**Category:** flash
**Created:** [January 14, 2008, 10:07pm UTC](https://forum.kirupa.com/t/how-to-find-pixel-width-of-a-dynamically-loaded-text-box/249050 "2008-01-14T22:07:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jguerilla](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jguerilla](https://forum.kirupa.com/u/jguerilla)
#### Post date: [January 14, 2008, 10:07pm UTC](https://forum.kirupa.com/t/how-to-find-pixel-width-of-a-dynamically-loaded-text-box/249050/1 "2008-01-14T22:07:40Z")

</div>

Hey guys Im having a serious issue I gotta figure out for a flash piece. I have four text areas that are dynamically loaded in via actionscript. They rotate with a photo slideshow that happens above the text. The issue I am having is that I need to make sure the text is evenly spaced so that I can place a “|” between the text. Each of the text areas is a link, so they are all in different MCs. Im thinking I need to figure out how to compute the pixel width of the text that is loaded into that area. If I can figure that, then I would be able to place the “|” and textfields where they need to go. Heres the code Im using for positioning, right now I am computing the character count and using that but that causes inconsistentcy in the design. the p1\_mc, p2\_mc, p3\_mc are the “|” MCs:  
[SIZE=2]  
[/SIZE][FONT=Courier New][SIZE=2]\_root.btmInfo\_mc.btmContainer\_mc.p1\_mc.\_x = (\_root.btmInfo\_mc.btmContainer\_mc.linka\_mc.\_x)+((mynewString\_a.\_width)\*4)+20;  
\_root.btmInfo\_mc.btmContainer\_mc.linkb\_mc.\_x = \_root.btmInfo\_mc.btmContainer\_mc.p1\_mc.\_x+20;  
\_root.btmInfo\_mc.btmContainer\_mc.p2\_mc.\_x = (\_root.btmInfo\_mc.btmContainer\_mc.linkb\_mc.\_x)+((mynewString\_b.length)\*4)+20;  
\_root.btmInfo\_mc.btmContainer\_mc.linkc\_mc.\_x = \_root.btmInfo\_mc.btmContainer\_mc.p2\_mc.\_x+20;  
\_root.btmInfo\_mc.btmContainer\_mc.p3\_mc.\_x = (\_root.btmInfo\_mc.btmContainer\_mc.linkc\_mc.\_x)+((mynewString\_c.length)\*4)+20;  
\_root.btmInfo\_mc.btmContainer\_mc.linkd\_mc.\_x = \_root.btmInfo\_mc.btmContainer\_mc.p3\_mc.\_x+20;

[FONT=Verdana]  
Any help I can get would be great. Thanks[/FONT]  
[/SIZE][/FONT]
