I’m trying to load a bunch of code from a text file. It’s bombing at the point it sees the < and > characters (i.e., it just stops rendering beyond that point). I’ve tried the %3e and %3c solutions, no go. I’ve tried <, as Moock suggests. I’ve tried .
Anyone know the secret?
Here’s my code:
loadText = new LoadVars();
loadText.load(“potential_win.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.htmlText = this.myText;
scroller.htmlText = unescape(this.myText);
};
I’ve never had any problems putting < and > in external text files. The only character that would end a variable is the amperstand “&”. You’ll have to post the contents of your text file to see exactly whats going on…
Project started in MX , later transfered in MX2004 for commodity, with prototypes so the settings are: export for Player6 with AS1
Rendering html tags in a runtime created TextField (with .html enabled), the text is loaded via LoadVars, everything ok until in the text appear the " < " caracter, after that nothing show up…
Tired the ASCII %3c , the same kill effect, but the %3b and the “>” as %3e show up…
The < and > kill the rendering also.
Please play around with my code, maybee someone can figure out why…or can suggest a combination that work.
The .txt file is located in the Pages folder.
I tested also on Flash8 with Player8, same result…
Im to tyred and fustrated to search the bug threads
Scotty: .html is true(I use for text formating)… and the problem persist only for < , the > show up fine, the %3c have an “&” behavoir…
TheCanadian : is loaded properly this is page22 I load with the same code, and the first with “<”
The text is large, a whole page 800x590, so not proper for load via XML, and a lot of pages need to be loaded containing the < …around 30-35
gvozden: thanks for the tip: load [ ] and replace in flash… this is a solution for my problem, no the best but solve the problem, the backward is: this text later need to be edited by others…who wait to find html code inside :))
In that file you posted, the data is loaded fine from *page_test.txt. *Your problem is that there is no text field to even put the loaded text into. So like scotty and I said, you have a problem displaying the text in Flash.
Then I don’t know what your having a problem with because it loads the text file fine and puts it in the text field with the correct formatting applied.
Pls. edit the .txt file and put the “<” as %3c(or whatever) somewhere and from that point the text disapear / at least for me, if on your machine show up fine tell me which flash version, what player u used.
Help pls
the simple < > wont show up
Use of html tags - becouse this is the subject of this project, a comprehensive presentation of html tags and their use/effect on a webpage