# Text Formatting

**URL:** <https://forum.kirupa.com/t/text-formatting/266489>\
**Category:** flash\
**Created:** [July 21, 2008, 2:21pm UTC](https://forum.kirupa.com/t/text-formatting/266489 "2008-07-21T14:21:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hairytea](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@hairytea](https://forum.kirupa.com/u/hairytea)\
**Post date:** [July 21, 2008, 2:21pm UTC](https://forum.kirupa.com/t/text-formatting/266489/1 "2008-07-21T14:21:50Z")

</div>

If i were to format text before written to the document in javascript i would do something like the following…

var string = “This is Bold Text”.bold() + “This is NOT Bold Text”

documrnt.write(string);

What is the equivilent way to do this in action script?

(I want to load text into a dynamic box when called from a button click. That’s working ok! I just need to format certain parts of the string!)

i.e. to be output like this

**Name:**  
Someone

**Job Title:**  
Some Job Title

**Responsibilities:**  
Accounts, Sales etc
