Groups | Blog | Home
all groups > flash (macromedia) > september 2005 >

flash (macromedia) : Import HTML file to text box


Raconteur
9/5/2005 6:47:18 PM
Hi all,

I am sure this has been answered a million times, but I cannot seem to find a
clear answer anywhere...

I have an HTML file that I want to load and display in a text box (with HTML
formatting turned on, of course), when the user rolls over a button.

How do I open, import and display the HTML file? I tried using loadVariables,
but there are none in the HTML, and if I try to add them, things like  
will mess up the import, right?

Thanks for any input!

Chris
NSurveyor
9/5/2005 6:58:35 PM
First of all, I hope you know that Flash has minimal HTML support, look in the
Hep Files: Using ActionScript in Flash > Supported HTML tags. Anyways, use
LoadVars with onData event handler. For example:

my_lv = new LoadVars();
my_lv.onData = function(raw_text){
trace(raw_text);
myTextField.htmlText = raw_text;
}
my_lv.load("myfile.html");
NSurveyor
9/5/2005 6:59:05 PM
Raconteur
9/5/2005 7:14:22 PM
NSurveyor
9/5/2005 8:09:53 PM
AddThis Social Bookmark Button