View Full Version : Loading a text file into a dynamic text box
holdaway
12-15-2003, 12:21 PM
I am having some issues loading text into a text file.
The loads fine from an external .rtf file using the loadVariables function.
I have embedded fonts and it looks great.
My issue is, characters like ' and " appear as weird characters.
Also, I want to bold or italicize some words, and, if possible, make some words different colours.
Could someone point me in the right direction?
I have seen the use of the backslash. Is this the way to go, and if so, how does one use the backslash to solve this issue?
farafiro
12-16-2003, 05:45 AM
these are called the escape characters
just use the backslash b4 them,like \' or \"
Stimpson
12-16-2003, 05:47 AM
Hey,
My issue is, characters like ' and " appear as weird characters.try setting: useCodePage=true. Also do a search here, many threads already covered this problem ;).
Also, I want to bold or italicize some words, and, if possible, make some words different colours.Turn the text into html, and possibly tie an stylesheet to it. Then asign it as htmlText to an html-enabled dynamic textfield.
farafiro
12-16-2003, 05:54 AM
Stimpson
no, the System.useCodePage won't solve the escape characters issue
Stimpson
12-16-2003, 06:06 AM
Stimpson
no, the System.useCodePage won't solve the escape characters issueHmmmm......I read it as characters like 'and'' with '' being a typo and meaning &.............ah well :) ;).
farafiro
12-16-2003, 06:09 AM
okey
never mind
I forgive you this time
:p
Stimpson
12-16-2003, 06:14 AM
I forgive you this timeHmmmmm, well.........pleased to hear it. That means I dont have to stand in the corner now? ;) :p.
holdaway
12-16-2003, 12:21 PM
Hmmm... a little confused here.
OK, so I change the .rtf to an .html file. That's easy enough.
Do I still write;
&textbox= texttexttexttext
....in the .html document so the textbox in Flash can read it?
The dynamic text field is already assigned to read HTML, so that's taken care of. So, will I need to use escape characters (\) in the .html document so it will read quotes, etc?
And how do I assign the .html document as htmlText, as stated above?
holdaway
12-16-2003, 02:35 PM
OK, so the text document is now an html document.
I put &textbox= This is the text.&
...in the html file and it worked!
It looks like you can't embed fonts in Flash AND read from an HTML file. When I try and do both, the text disappears. Is there a way around this? Just wondering, because the text looks a lot better when the text is embedded (but then of course the problems with italics and general formatting appear again when using an .rtf file).
Stimpson
12-16-2003, 04:20 PM
It looks like you can't embed fonts in Flash AND read from an HTML file. When I try and do both, the text disappearsDo you have a font face defined in the html? If so it must be the same as the embedded font. Otherwise you won't see the text.
You could also just put html formatted text in a txt file and load that. it will still betreated as html, but it's perhaps somewhat more manageble :).
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.