# Centering externally loaded text

**URL:** <https://forum.kirupa.com/t/centering-externally-loaded-text/200393>\
**Category:** Uncategorized\
**Created:** [September 11, 2006, 9:31pm UTC](https://forum.kirupa.com/t/centering-externally-loaded-text/200393 "2006-09-11T21:31:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanyah](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tanyah](https://forum.kirupa.com/u/tanyah)\
**Post date:** [September 11, 2006, 9:31pm UTC](https://forum.kirupa.com/t/centering-externally-loaded-text/200393/1 "2006-09-11T21:31:20Z")

</div>

I have a dynamic text box with externally loaded text. I want the text to be centered in the box but i cant seem to figure it out. im pretty new at this so ive been going through loads of tutorials to get this website up.

so is there a code i need to use for the text box or do i need to put a code on my txt document???

im using this code for the text box:

myLoadVar = new LoadVars();  
myLoadVar.load(“photos.txt”);  
myLoadVar.onLoad = function(success) {  
if (success == true) {  
output.variable = “photos”;  
output.htmlText = myLoadVar.photos;  
}  
};

and the instance name for the dynamic text box: output

thanks in advance 🙂

[www.platinumcollisioncenter.net](http://www.platinumcollisioncenter.net)
