# htmlText command - images inside dynamic text

**URL:** https://forum.kirupa.com/t/htmltext-command-images-inside-dynamic-text/76190
**Category:** flash
**Created:** [January 15, 2005, 11:15pm UTC](https://forum.kirupa.com/t/htmltext-command-images-inside-dynamic-text/76190 "2005-01-15T23:15:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ellare](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@ellare](https://forum.kirupa.com/u/ellare)
#### Post date: [January 15, 2005, 11:15pm UTC](https://forum.kirupa.com/t/htmltext-command-images-inside-dynamic-text/76190/1 "2005-01-15T23:15:19Z")

</div>

**can you put links on texts (or use an invisible button) or insert graphics, other movie clips, inside dynamic text that is scrolling using a scrollbar component ?**

i have looked here - but their info didnt seem to help.  
[http://www.kirupa.com/forum/showthread.php?t=42718&highlight=movie+clips+inside+dynamic+text](http://www.kirupa.com/forum/showthread.php?t=42718&highlight=movie+clips+inside+dynamic+text)

i have also looked at “working with text overview” in the flash help files  
it says this:  
**[size=2]Embedding SWF and JPEG files[/size]**

[color=black]To embed a JPEG or SWF file in a text field, specify the absolute or relative path to the JPEG or SWF file in the \<img\> tag’s src attribute. For example, the following code inserts a JPEG file that’s located in the same directory as the SWF file:[/color]

[color=black]textField\_txt.htmlText = “\<p\>Here’s a picture from my last vacation:\<img src=‘beach.jpg’\>”;[/color]--------------  
i want this:  
i have a dynamic scrolling text box with lots of info typed in it. at the end of the paragraph, i want a picture of myself

i wanted to just enter my text in my dynamic scrolling text box and add the photo of myself at the end. but i ended up having to type the whole paragraph INSIDE this **htmlText** command to get the stupid picture to show.

the instance of my dynamic text box where i had all the info typed is progressText

so on a frame action i did this:  
progressText.html = true  
progressText.htmlText = “\<p\>\<b\>blah blah blah about a million times\<br\>\<br\> my picture \<img src=‘lrsphoto2’\>\<br\>\<br\>\</b\>”;

(lrsphoto is actually an identifier from a movieclip of a picture of myself)

because of the [color=black] **htmlText** [/color]command line - i HAD to type some text in order to get my photo to show.

**[color=darkorange]if i do this - the photo wont show up[/color]**  
**[color=darkorange]progressText.html = true[/color]**  
**[color=darkorange]progressText.htmlText = “\<img src=‘lrsphoto’\>”;[/color]**

is there some kind of command like\* htmlImage\* that will allow images to show so that i dont have to type all this text in html ?

* * *

also in my html - if i try to center my photo, these center tags do not work - any suggestions?  
\<center\> or \<div align=center\>

progressText.htmlText = “\<p\>\<b\>blah blah blah about a million times\<br\>\<br\> my picture \<center\>\<img src=‘lrsphoto’\>\</center\>\<br\>\<br\>\</b\>”;

or

progressText.htmlText = “\<p\>\<b\>blah blah blah about a million times\<br\>\<br\> my picture \<div align=center\>\<img src=‘lrsphoto’\>\</div align=center\>\<br\>\<br\>\</b\>”;

…neither works…

ellare
