# Loading images in text box from external txt file

**URL:** <https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948>\
**Category:** Uncategorized\
**Created:** [September 30, 2004, 8:57pm UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948 "2004-09-30T20:57:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabi](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rabi](https://forum.kirupa.com/u/rabi)\
**Post date:** [September 30, 2004, 8:57pm UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948/1 "2004-09-30T20:57:47Z")

</div>

hello kirupa guys,

i hope to get some help in the loading images in dynamic text box. I am successul in loading images when the text is in the movie … like in the actionscript with some variables. But when I load an external text file… the same text doesn’t work for loading the images. The movie works fine otherwise but the image is not shown.

could anyone explain about it to me?  
I tried everything suggested by Macromedia website but the images doesn’t seem working with the externally loaded text.  
other html tags work with that file.

i look forward hearing something…

sincerely,  
rabi

---

<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 1, 2004, 3:37am UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948/2 "2004-10-01T03:37:57Z")

</div>

how are you trying to load the images? could you post you code coz i am just a little confused

---

<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 1, 2004, 7:50am UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948/3 "2004-10-01T07:50:36Z")

</div>

I followed the kirupa loading text tutorial…

```auto
loadText = new LoadVars();
loadText.load(_parent._parent.txtControl.txtToLoad);
loadText.onLoad = function(success) {
	if (success) {
		//trace("loaded text");
		_root.conMain.clickSound();
		_parent.textLocator.loadedText = this.myText;

```

The .loadedText is in variable field. The text file has the variable name myText. And the html tag for image i used is \<img src=‘clock.gif’/\>

so there is an external text file and i loaded it in a movie instance in another movie… like there is movie A… another movie B loads into A. The external texts loads into movie B. I hope you will get some picture now.

thanks for you consideration,  
I appreciate that

---

<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 1, 2004, 8:18am UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948/4 "2004-10-01T08:18:01Z")

</div>

Hi

Be sure to use a \<p\>\</p\> set around the \<img … tag.

And the \<img src=‘clock.gif’/\> doesnt need the closing / like that. Should be \<img src=‘clock.gif’\>.

Also, load the variable to a .htmlText property instead of the .text

> \_parent.textLocator.loadedText = this.myText;

should be tried like:

var theText = this.myText  
\_parent.textLocator.loadedText.htmlText = theText;

I’ve had some issues with not using an assingment var before.  
Also, just for checking sake, use a local, same folder, .jpg file as the paths can be tricky. 😉

Hope this Helps  
Findal  
[www.fndzinz.com](http://www.fndzinz.com)

---

<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 1, 2004, 10:50am UTC](https://forum.kirupa.com/t/loading-images-in-text-box-from-external-txt-file/65948/5 "2004-10-01T10:50:44Z")

</div>

well, i guess i don’t need to comment, Findal said it all and very well to. kudos to you Findal
