PDA

View Full Version : How do I read an HTML file into a text field?


Terpentine
06-23-2004, 07:29 AM
Hi

I would have thought the answer to this topic should have been relatively straightforward. However, simple things sometimes overly complex in Flash. Anyway, I haven't found any good WORKING instructions on this. Can one of you wise folks help?

Cheers!

PS! I have access to Flash mx 2004, if need be

oldnewbie
06-23-2004, 08:06 AM
You can't have html content within a Flash movie, outside of some html1.0 formated text in dynamic textfields. MX2004 does handle some CSS capabilities, but is still limited...

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

Terpentine
06-23-2004, 08:23 AM
I don't mean to have a fully featured HTML file with its <head>, <title> etc. All I want is to write "<B>Heading</B>Main text", save it as text.html and then read it into the text field with proper formatting? Surely that must work?

Actually, I have found a solution now, using loadVariablesNum("text.html", 0) and inside the .html file "text=<B>Heading</B>Main text". I think the loadVariablesNum approach is somewhat inflexible though (having to start the .html file with "text="). Maybe I'm too demanding :)

CyanBlue
06-23-2004, 08:25 AM
Yes... You ARE very demanding... :p Nah... Just kidding... :)

Do the search on 'LoadVars onData raw' in the forum and you should be able to find the method you are looking for... ;)

Terpentine
06-23-2004, 08:30 AM
Yes... You ARE very demanding... :p

tehe :D

Thanks for the tip, wahey, my own post is the first hit! Seems to be a bit of a quagmire of LoadVar threads there. Oh dear, ANOTHER actionscript subject to delve into? :eek:

Any particular thread you're thinking of?

thanks again

CyanBlue
06-23-2004, 08:50 AM
Um... Are you saying that you are too lazy to dig into the load of information out there??? Yes, you are VERY demanding... :D

Check this thread out then... (Yes, you still need to search from that thread... :p)
http://www.actionscript.org/forums/showthread.php3?t=31471

Terpentine
06-23-2004, 08:55 AM
Um... Are you saying that you are too lazy to dig into the load of information out there??? Yes, you are VERY demanding... :D


Sorry! I thought just after that it was a bit rude of me, so I went for it anyway. I think I see what you're getting at, but I got to do a bit more reading. However, another issue has arisen for which I will create a new topic.

I won't be demanding again, promise :D (I'm just getting annoyed with AS for being so silly sometimes).

Terpentine
06-23-2004, 09:02 AM
Come to think of it, it may be that *I* am being silly and AS is being downright reasonable. However, with may highly developed self-insight and completely objective viewpoint, surely this cannot be so. ;)

CyanBlue
06-23-2004, 09:10 AM
OH, I don't mind searching for you as long as I know which one I was referring to... I just wanted you be abit more active... That's all... ;)

Being silly... Flash is pretty silly from time to time... That's for sure...

Terpentine
06-23-2004, 12:01 PM
Being silly... Flash is pretty silly from time to time... That's for sure...

Thanks for reassuring me I'm not a fool :)

now, enough with the chit-chat! Back to work. Work, after all, should NOT be fun!

tada

CyanBlue
06-23-2004, 12:39 PM
That I cannot agree with you...
Work SHOULD be fun...
If it is not fun, you have wrong profession... :)

Nicksta
08-01-2004, 01:52 PM
I'm having the exact same problem with trying to load html files into dynamic text boxes I found a component on the Macromedia Exchange that handles it well. Its called "External text Mx" I'm alittle lost at how to use it tho :(