Log in

View Full Version : Flash Won't Load HTML Text



tomyknoker
05-14-2007, 03:27 AM
Hi all... I can't get my text to render as HTML no matter what I do, maybe I'm just missing something simple... Here is my code:


function loadTxt(theTxt){
var lv:LoadVars = new LoadVars();
lv.onLoad = function(success:Boolean){

if (success){
my_text.html = true;
my_text.htmlText = lv.txt;
my_text.mouseWheelEnabled = true;
my_text.selectable = true;
my_text.multiline = true;
}else{
trace ("cannot load text!");
}
};
lv.load(theTxt);
}

And then on frame 20 I have this:


loadTxt("text/file.txt")

It loads fine but if I add any HTML say for instance <b> the text displays up until it gets to that point and then stops... I made sure that "render Text As HTML" was also checked... But no luck :(

Mehok
05-14-2007, 09:12 AM
ok you got that some what wrong

in your flash movie place a dynamic text box the size you would need and that would be in a seperate layer called text

in the properties of the dynamic text you would see a box called var type something like index_text

and in the link box type the location of your text file eg
../text.txt

in the text file you would type the content in as

index_text= Bla Bla Bla

and this would appear in the flash now you can use <p></p> and <br /> tags as far as i know but about hyperlink text I am not sure