# Textfield alignment from left to right

**URL:** <https://forum.kirupa.com/t/textfield-alignment-from-left-to-right/237821>\
**Category:** Uncategorized\
**Created:** [September 4, 2007, 11:25am UTC](https://forum.kirupa.com/t/textfield-alignment-from-left-to-right/237821 "2007-09-04T11:25:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [September 4, 2007, 11:25am UTC](https://forum.kirupa.com/t/textfield-alignment-from-left-to-right/237821/1 "2007-09-04T11:25:53Z")

</div>

Hey all  
I have created a dynamic text area that populates via an xml feed.  
it works really well. I found the solution from someone here.

the only thing is I have the languages change from english-russian-arabic.  
this works well but arabic needs to be align from the right.

```auto
MovieClip.prototype.resize = function() {
    var speed = 2;
    var w = box.caption.textWidth+5
    var h = box.caption.textHeight+5;

            this._width = w;
            this._height = h;
    
};

        _root.x = 1;
        box.createTextField("Caption", 1, box.test._x+2, box.test._y+2, 230, 50);
        box.Caption.type = "dynamic";
        
        box.Caption.html = true;
        box.Caption.multiline = true;
        box.Caption.wordWrap = true;
        myformat = new TextFormat();
        box.Caption.size = 18;
        box.Caption.autoSize = "left";
        box.Caption.textColor = 0xffffff;
        myformat.font = "Arial";
        box.test.resize();
        
        box.Caption.setNewTextFormat(myformat);
        myformat.align = "right";
        box.setMask (scrollerMask);
        box.Caption.htmlText = this.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;

```

myformat.align = “right”;  
this in my opinion should force the text alignment.  
I have tried textAlign box.text.align and so on.  
does anybody have any wisdom on the matter??

cheers  
🍺
