# Html coding in textbox

**URL:** https://forum.kirupa.com/t/html-coding-in-textbox/6480
**Category:** Uncategorized
**Created:** [October 8, 2002, 4:42pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480 "2002-10-08T16:42:10Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![vazash](https://avatars.discourse-cdn.com/v4/letter/v/edb3f5/32.png) [@vazash](https://forum.kirupa.com/u/vazash)
#### Post date: [October 8, 2002, 4:42pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/1 "2002-10-08T16:42:10Z")

</div>

hi everyone,

Can anyone tell me what the ‘html’ tag is in the text properties, i understand that it is a way to code html into the textbox and would like to know how does one do that…i.e. code html…

---

<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: [October 8, 2002, 5:01pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/2 "2002-10-08T17:01:51Z")

</div>

Umm, I believe in Flash 5 you check that HTML tag box and then give your textBox an instance name (i will use myTextBox)

```auto
myTextBox = "< B>This is bold text </ B>"

```

Remove the spaces between the bold tags of course. I am not sure if this works as I use MX and it works a tad bit differently in that aspect, but I think 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: [October 9, 2002, 2:07pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/3 "2002-10-09T14:07:11Z")

</div>

The accepted tags are

\< font\>  
\< a\>  
\< b\>  
\< i\>  
\< br\>  
\< p\>

without the spaces of course

You use them in exactly the same way as in html - and the rules of nested syntax and closing tags apply

don’t forget that if you use an embedded font with \< b\> and/or \< i\> then you need to include the bold, italic and/or bold-italic outlines as appropriate.

---

<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: [October 9, 2002, 4:34pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/4 "2002-10-09T16:34:15Z")

</div>

thanks for the help guys but after many unsuccessful attempts it has not worked…can you pls tell me the steps that i have to go through to attach the html coding…do i have to type the text in the actions panel if so then this should be in the key frame right…but when i type text in the keyframe then i don’t get it in a paragraph form or rather verse form which i would like…

thanks once again for the 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: [October 9, 2002, 5:23pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/5 "2002-10-09T17:23:25Z")

</div>

Ok, assuming you’ve created a dynamic text field on the main timeline called showText with the html box checked, if you declare the variable

showText="\< a href=‘[http://www.kirupaforum.com](http://www.kirupaforum.com)’\>This is a link to Kirupaforum.\</a\>"

don’t put a space between the \<b\>"\<"\</B\> and the \<b\>“a”\</b\> - I have to so they’ll show up in the forum

When you publish, you’ll have a link to this forum

---

<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: [October 9, 2002, 5:27pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/6 "2002-10-09T17:27:26Z")

</div>

Yes, and the text MUST be entered in actionscript to render as HTML.

---

<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: [October 10, 2002, 9:40am UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/7 "2002-10-10T09:40:23Z")

</div>

cool thanks for the quick replies, i really enjoy posting on this forum coz the replies come in so fast…another question guys, I have made a separate mc, in which on different keyframes namely 1,2,3 i have made a dynamic textfield with different text in the different keyframes…the data in the text field in frame 1 is changed in frame 2 and so on in frame 3. I have targetted buttons to these various keyframes but the data does not change. I have labeled the keyframes too but to no effect. I used the tell target\>gotoandStop() actions to stop at individual keyframes and no matter what button i click on I still get the information that is contained in keyframe1 when it should show information shown in keyframe 3 or 2…what am i doing wrong here…

---

<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: [October 10, 2002, 2:45pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/8 "2002-10-10T14:45:45Z")

</div>

Here is an easier way…

Try this… it only uses 1 frame.

On your frame add these action…

```auto
myText1 = "This is page 1";
myText2 = "This is page 2";
myText3 = "This is page 3";
myTextBox = myText1;

```

Then create your dynamic textBox and give it the var name “myTextBox” (without quotes).

Now make three buttons.

On button 1 add this…

```auto
on (release) {
	_root.myTextBox = _root.myText1;
}

```

On button 2 add this…

```auto
on (release) {
	_root.myTextBox = _root.myText2;
}

```

On button 3 add this…

```auto
on (release) {
	_root.myTextBox = _root.myText3;
}

```

Now test the movie and click each button.

I hope this helps!

---

<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: [October 11, 2002, 2:30pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/9 "2002-10-11T14:30:20Z")

</div>

lost, thanks for the help and the code. It worked fine 🙂 but can u pls tell me where i went wrong in the code that i had created as mentioned in my earlier post…will try seeing what i had done wrong myself but would appreciate some input from all you super flashers out there…also does scripting load faster than if i use a text box with information written inside it…

---

<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: [October 11, 2002, 4:38pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/10 "2002-10-11T16:38:55Z")

</div>

Can you post an example .fla of what you were trying to do before?

Yes, I believe loading text through AS or an external file does load faster than if you just put it in a text box. Not 100% sure, but I think it does.

---

<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: [October 14, 2002, 6:31pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/11 "2002-10-14T18:31:51Z")

</div>

But what if you have a lot of text to put in “myTextBox”?  
how can you make a blank line, i tried /r/n but this didn’t work…

Andreas

---

<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: [October 14, 2002, 7:07pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/12 "2002-10-14T19:07:56Z")

</div>

To start a new line you can do this…

(not /n)

Or you can do it like this…

```auto
myText += "help 
";
myText += "I superglued 
";
myText += "Myself to 
";
myText += "Myself";
mybox.text = myText;

```

---

<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: [October 15, 2002, 2:49am UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/13 "2002-10-15T02:49:37Z")

</div>

lost, can u tell me what the  
does to the text, andersonm mentioned something about being able to put the text on a new line right, so why can’t we use \< br \> or \< p \> or does  
do something else… pls let me know thanks…

---

<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: [October 15, 2002, 10:53pm UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/14 "2002-10-15T22:53:36Z")

</div>

If you HTML enable your text box you can simple add an HTML break tag like you demonstrated.

If you do not HTML enable your text box you can create a new line by using  
. It is just a string manipulation thing I suppose.

---

<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: [October 16, 2002, 11:38am UTC](https://forum.kirupa.com/t/html-coding-in-textbox/6480/15 "2002-10-16T11:38:16Z")

</div>

Thanks for the quick reply lost… hope we can help each other out some other time.
