# Scrolling box with images and text

**URL:** <https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267>\
**Category:** Uncategorized\
**Created:** [June 24, 2008, 3:11pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267 "2008-06-24T15:11:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pancake](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@pancake](https://forum.kirupa.com/u/pancake)\
**Post date:** [June 24, 2008, 3:11pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/1 "2008-06-24T15:11:36Z")

</div>

Hey guys, I’m very new to AS3 -

I’ve made a text field with text content and custom scroll arrows, and the text field loads XML content. Now I’d like to add images in the text field box, but I’m not sure you can do that. My Google searches proved unfruitful.  
Is there a good way of doing this?

Thanks!

---

<div class="post-metadata">

**Author:** ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)\
**Post date:** [June 24, 2008, 3:55pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/2 "2008-06-24T15:55:15Z")

</div>

hey pancake, if you make your text box an html text box and load in html rather than xml then you can embed images with the usual html tags… or does it have to be xml you’re loading in there? i did a site recently where my loaded content was just in a .txt file but was html formatted and it loaded really nicely into an html text field.

---

<div class="post-metadata">

**Author:** ![pancake](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@pancake](https://forum.kirupa.com/u/pancake)\
**Post date:** [June 24, 2008, 4:00pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/3 "2008-06-24T16:00:16Z")

</div>

I have to use XML. I’ve tried using something like:

info\_txt.htmlText += “\<image src=etcetc\>”;

which doesn’t work either.

---

<div class="post-metadata">

**Author:** ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)\
**Post date:** [June 24, 2008, 4:09pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/4 "2008-06-24T16:09:14Z")

</div>

ok i just tried it out and it’s kinda interesting. first off, your should replace

“\<image src=etcetc\>”

with

‘\<image src=etcetc\>’

as you’re already inside “”.

second, it seems still not to work unless you have something (anything, could even be a space) before the image - this code works for me:

info\_txt.htmlText += " \<img src=‘yourimage’\>";

---

<div class="post-metadata">

**Author:** ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)\
**Post date:** [June 24, 2008, 5:14pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/5 "2008-06-24T17:14:21Z")

</div>

the aforementioned problem only occurs when using += and not with just = BTW.

---

<div class="post-metadata">

**Author:** ![pancake](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@pancake](https://forum.kirupa.com/u/pancake)\
**Post date:** [June 24, 2008, 5:23pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/6 "2008-06-24T17:23:10Z")

</div>

Ah, all right - thanks! Works perfectly!

Out of curiosity, would you know of any way to add movie clips or graphics to the text field without using HTML?

---

<div class="post-metadata">

**Author:** ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)\
**Post date:** [June 24, 2008, 6:14pm UTC](https://forum.kirupa.com/t/scrolling-box-with-images-and-text/264267/7 "2008-06-24T18:14:28Z")

</div>

glad you’re sorted! i’m afraid i don’t know how to do it without using html… maybe someone else on here can help?  
🙂
