Loading images in text box from external txt file

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

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

I followed the kirupa loading text tutorial…

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

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. :wink:

Hope this Helps
Findal
www.fndzinz.com

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