# Formatting scrollable text

**URL:** <https://forum.kirupa.com/t/formatting-scrollable-text/12770>\
**Category:** Uncategorized\
**Created:** [February 4, 2003, 4:16pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770 "2003-02-04T16:16:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![time2design](https://avatars.discourse-cdn.com/v4/letter/t/85e7bf/32.png) [@time2design](https://forum.kirupa.com/u/time2design)\
**Post date:** [February 4, 2003, 4:16pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/1 "2003-02-04T16:16:35Z")

</div>

Hey sweet peeps,

In kirupa’s tutorial about making a scrolling text block, you enter the text to be displayed as one line inside an actionscript window.

This works fantastically well, but how do you format it? I’ve noticed returns are “/r” but what about italics or tabs?

Thanks in advance,

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 7:29pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/2 "2003-02-04T19:29:45Z")

</div>

anyone, please?

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 8:01pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/3 "2003-02-04T20:01:08Z")

</div>

I’ve not seen the tute, but I think you should be able to use most html formating tags. I’m sure I’ve seen a thread on this before. Try searching for ‘dynamic text’ and ‘html’

Hope this is some help:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 8:24pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/4 "2003-02-04T20:24:52Z")

</div>

try this;

[http://www.kirupaforum.com/showthread.php?s=&threadid=13587&highlight=html+dynamic](http://www.kirupaforum.com/showthread.php?s=&threadid=13587&highlight=html+dynamic)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 8:57pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/5 "2003-02-04T20:57:44Z")

</div>

**usage**

```auto
myTextFormat = new TextFormat()
myTextFormat.bold = true
myTextField.setTextFormat(myTextFormat)

```

**properties**

**TextFormat.align** Indicates the alignment of a paragraph

**TextFormat.blockIndent** Indicates the block indentation in points

**TextFormat.bold** Indicates whether text is boldface

**TextFormat.bullet** Indicates whether or not text is in a bulleted list

**TextFormat.color** Indicates the color of text

**TextFormat.font** Indicates the font name of the text with a text format

**TextFormat.indent** Indicates the indentation from the left margin to the first character in the paragraph

**TextFormat.italic** Indicates whether text is italicized

**TextFormat.leading** Indicates the amount of leading vertical space between lines

**TextFormat.leftMargin** Indicates the left margin of the paragraph

**TextFormat.rightMargin** Indicates the right margin of the paragraph

**TextFormat.tabStops** Specifies custom tab stops

**TextFormat.target** Indicates the window in a browser where a hyperlink is displayed

**TextFormat.size** Indicates the point size of text.

**TextFormat.underline** Indicates whether text is underlined

**TextFormat.url** Indicates the URL to which the text links

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 4, 2003, 10:37pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/6 "2003-02-04T22:37:15Z")

</div>

Thanks folks. I don’t really know too much about dynamic text yet but I’ll give these a looking into.

thanks, merci, gracias, arigatou, danke

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 12:45am UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/7 "2003-02-05T00:45:31Z")

</div>

I don’t understand this:

myLoadVars = new LoadVars();  
myLoadVars.onLoad = function(success) {  
if (success) {  
texti = unescape(this);  
myTextBox.html = true;  
myTextBox.htmlText = texti.substring(0, texti.lastIndexOf("&"));  
} else {  
trace(“Error Loading file…”);  
}  
};  
myLoadVars.load(“textfile.txt”);

Where does this code go? Just anywhere in the same movie as the scrolling text bar?

What do I name my text box variable?

Is “textfile.txt” the external text file?

I can’t get this to work.

kax, I don’t know how to do it your way either.

All I’m trying to do is make my scrolling text block have tabs and italics, I don’t care if it’s from an external text file or if it’s embedded.

Please help. ☹

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 1:13am UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/8 "2003-02-05T01:13:50Z")

</div>

> Where does this code go? Just anywhere in the same movie as the scrolling text bar?

yes. anywhere when you want to load the text

> What do I name my text box variable?

give it a **instance name** not a variable. the instance name is **myTextBox** in that case

> Is “textfile.txt” the external text file?

yes. change it to whatever you named your text file

or …

```auto
myTextFormat = new TextFormat ()
myTextFormat.italic = true
dynamicTextFieldInstanceName.setTextFormat (myTextFormat)

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 1:44am UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/9 "2003-02-05T01:44:25Z")

</div>

No luck whatsoever.

I’m so aggravated! I’m doing this in Flash 5 but it isn’t working in Flash MX either.

The .fla file is (do save target as): [www.argoncreative.com/test/intro03-4.fla](http://www.argoncreative.com/test/intro03-4.fla)

The text file is (do save target as): [www.argoncreative.com/test/FAQs.txt](http://www.argoncreative.com/test/FAQs.txt)

☹

edit: the problem is in the FAQs section.

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 3:57am UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/10 "2003-02-05T03:57:22Z")

</div>

wow dude !! your file was a real mess :stunned:

anyway … just copy and paste in your file and it should work

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 2:27pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/11 "2003-02-05T14:27:19Z")

</div>

This works in Flash MX but not in Flash 5.

I think because you can’t name an instance in Flash 5 unless it’s a symbol.

I tried making the text field a symbol and it didn’t work. I also tried copying and pasting the code to the level of the text field symbol and that didn’t work either.

Does anyone know how to get around this problem?

t2d

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2003, 9:26pm UTC](https://forum.kirupa.com/t/formatting-scrollable-text/12770/12 "2003-02-05T21:26:20Z")

</div>

just one question … why is this thread in the flash mx section then?

> I’m doing this in Flash 5 but it isn’t working in Flash MX either

which means that you have them both … isn’t it?  
just make the fla in mx !!
