HTML in DynamicTextBox

I’ve got a dynamic textbox loads a .txt file with HTML code in it. The problem is that it only loads simple things (ie. plain text, the < B >, < BR >, < U >, < I > tag etc.) but it doesn’t seem to like < table > or lists etc. … is there anyway of getting around this?

If anyone wants to see this in action, check out my website and go to my resume.

Only html formatting tags are supported.

Hi!
I have a similar HTML-Problem with Flash.
Macromedia support says Flash can read “a href” tags.

We tried the example shown on the page, but
nothing is being displayed in our textbox:*(

Does anyone have a clue what we are doing wrong…?

Thanks a lot for your help

Oh yeah they do work, oh sorry i didn’t mention so!

You should enable html in your textfield:

myTextBox.html = true

myTextBox.htmlText= somevariable;

Thanks a lot, but my problem is that in my case, I am loading an external .txt file into flash.
Does it make a difference to flash wether the text is being loaded or typed directly into the
textbox???

In my case, flash just doesn’t display the link and also nothing below the textline with the link in it.

Do you have an idea how I could save that problem?

I think the best thing is to attach an example…

<space>

I load a file into flash with the following
actionscript:

lowlimit = 0;highlimit = 500;loadVariables(“news.php?lowlimit=”+lowlimit+"&highlimit="+highlimit, _root);
stop();

The news.php generates the text from a .txt file which is entered like that:

a href=“http://www.yahoo.com”>Testlink</a
(I didn’t write all the brackets cause it would then only display the link text for you)

but flash doesn’t display the link :sleep:
That’s what the part of the php which loads the text looks like:

		$fp=@fopen("guestbook.txt","r");
		@flock ($fp,2);
		$garr=array();
		while ($line=@fgets($fp,1024)){
			array_push($garr,$line);
		}
		$totalent=count($garr)-1;
		if ($totalent&lt;0){
			$totalent=0;
		}
		if($highlimit&gt;$totalent){
			$highlimit=$totalent;
		}
		print "&txtll=$lowlimit&txthl=$highlimit&totalentries=$totalent&txtmain=" ;
		if (count($garr)==0){
			print "&lt;br&gt;&lt;br&gt;&lt;b&gt; :::: Nothing to display :::: &lt;/b&gt;";
			exit();
		}
		$ar=array_reverse($garr);
		$garr=array();
		for($i=$lowlimit;$i&lt;=$highlimit;$i++){
			
				if (!$ar[$i]) {
						print "&lt;br&gt;&lt;br&gt;&lt;b&gt;::: Nothing Below This :::&lt;/b&gt;";
						exit;
				}
				print $ar[$i];
				print "&lt;br&gt;&lt;br&gt;";
		}
		@flock($fp,3);
		@fclose($fp);

hope that helps(-:

oh… thanks for your file…

I think one of the main issues is that you
load the link (as it seems to me :beam: ) as
a variable whereas I load it as text…

Yawn… :sleep: I think I have to look into
it 2morrow =)

Thanks a lot for your help

Take care
CU

*Originally posted by h88 *
**Only html formatting tags are supported. **

what’s meant by the above statement?

but either way, u just wanna say it just won’t support < table > etc. ??

*Originally posted by Gaztank *
**what’s meant by the above statement?

but either way, u just wanna say it just won’t support < table > etc. ?? **

Yup. :frowning:
http://www.macromedia.com/support/flash/ts/documents/htmltext.htm

aww … that kinda sux … hmm … this’ll probably make my page look kinda weird, now that i have to that stuff into PDF format … hehehe

whereas I load it as text…

Oh lol so your trying to load it all as a text…?

Text file content is:

textblahblabla

No variable…?

Yeah it can be done!

Here:

myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success) {
	if (success) {
		texti = unescape(this);
		myTextBox.html = true;
		myTextBox.htmlText = texti.substring(0, texti.lastIndexOf("&"));
	} else {
		trace("Error Loading file...");
	}
};
myLoadVars.load("textfile.txt");