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.
system
January 27, 2003, 4:23am
2
Only html formatting tags are supported.
system
January 27, 2003, 10:42pm
3
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
system
January 27, 2003, 10:47pm
4
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;
system
January 27, 2003, 11:01pm
5
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?
system
January 27, 2003, 11:16pm
6
I think the best thing is to attach an example…
system
January 27, 2003, 11:33pm
8
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<0){
$totalent=0;
}
if($highlimit>$totalent){
$highlimit=$totalent;
}
print "&txtll=$lowlimit&txthl=$highlimit&totalentries=$totalent&txtmain=" ;
if (count($garr)==0){
print "<br><br><b> :::: Nothing to display :::: </b>";
exit();
}
$ar=array_reverse($garr);
$garr=array();
for($i=$lowlimit;$i<=$highlimit;$i++){
if (!$ar[$i]) {
print "<br><br><b>::: Nothing Below This :::</b>";
exit;
}
print $ar[$i];
print "<br><br>";
}
@flock($fp,3);
@fclose($fp);
hope that helps(-:
system
January 27, 2003, 11:54pm
9
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
system
January 28, 2003, 12:09am
10
*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. ??
system
January 28, 2003, 12:13am
11
*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.
http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
system
January 28, 2003, 12:23am
12
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
system
January 28, 2003, 1:00am
13
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");