# Hscroll a dynamically created text field

**URL:** <https://forum.kirupa.com/t/hscroll-a-dynamically-created-text-field/177526>\
**Category:** Uncategorized\
**Created:** [February 2, 2006, 6:14pm UTC](https://forum.kirupa.com/t/hscroll-a-dynamically-created-text-field/177526 "2006-02-02T18:14:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![forwardtrends](https://avatars.discourse-cdn.com/v4/letter/f/cab0a1/32.png) [@forwardtrends](https://forum.kirupa.com/u/forwardtrends)\
**Post date:** [February 2, 2006, 6:14pm UTC](https://forum.kirupa.com/t/hscroll-a-dynamically-created-text-field/177526/1 "2006-02-02T18:14:20Z")

</div>

I’m trying to dynamically create an empty text field with as at 560px wide, fill it with a bunch of text (one line) and continuously scroll it from left to right using hscroll and setInterval.

I’ve read all kinds of specs about createTextField and hscroll but I can’t get it to work. I ouputted the mytext.hscroll value and it’s always at 0;

Maybe there is a better way than I have been trying or maybe I’m too fried out from looking at it… Any help would be huge - thanks.

```auto

_root.createTextField("mytext",10,150,281,560,10);
mytext.multiline = false;
mytext.wordWrap = true;
mytext.border = false;
mytext.htmlText = true;
mytext.html = true;
mytext.background = false;

myformat = new TextFormat();
myformat.color = 0x00A0C6;
myformat.font = "Sevenet 7";
myformat.size = 8;

uString = "Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. Here is a bunch of text. ";

mytext.text = uString.toUpperCase();

mytext.setTextFormat(myformat);

//functions

function startMove() {
    setInterval( moveText, 500 );
}

function moveText() {
    mytext.hscroll += 1;
}

startMove();

```
