I keep on running into weird formatting problems when working with external text files loaded in dynamic text boxes.
the latest is with the attached txt file.
It stops displaying the text right before the first href HTML tag…
Could anyone have a look at it and tell me what’s wrong with it?
Thanks a lot guys!
I experience no difficulties. Did you properly html enable your textbox? I used this code…
[AS]loader = new LoadVars();
loader.onLoad = function() {
mta.html = true;
mta.htmlText = this.myText;
};
loader.load(“info.txt”);[/AS]
Where mta was my textbox and loader was my loadVars() object.
yeah, it’s not something like that… The whole site has texts loading all over, I got all the variables working <u> and <i> tags work fine and h ref ones work fine in other parts of the site… So you see nothing wrong in that text file huh? Ho well, thx anyway lib!
ok, after experimenting a little more, I found out that if I tream the URL inside the href tag to something shorter <code>like http://www.amazon.com/</code> instead of <code>http://www.amazon.com/exec/obidos/tg/detail/-/B0000859TM/qid%3D1049130012/sr%3D8-4/ref%3Dsr_8_4/104-5957717-6394345?v=glance&s=videogames&n=507846</code> It works fine! Does anyone knows what could be causing the problem in this line? And how to go around it? thx… Looks pretty buggy if you ask me…
Oh, I didn’t notice your URL had a & in it.
The & symbol stands for new variable, and tells Flash to stop reading from there on.
Since your shorter URL does not contain the & symbol, it works fine.
You may have to use the HTML Special character code for that. I think it is…
&**amp;
& <-- yep it is…
Oh and yes… htmlText is actually pretty buggy, so watch out
yeah, good catch… didn’t think about that…
On the other hand, if you think about it, replacing “&” by “&+amp” doesn’t really help if you see what I mean… (the “&” is still there!
Is there any unicode or something like that I can use to replace it?
Oh, but &**amp; does work because Flash actually recognizes that tag.
Check this out…
http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
just for future reference… nothing I tried made this work.
I checked your link, thx… didn’t help tho.
To be honnest, I’m starting to seriously hate Flash on OS X as it’s one of the buggiest programs I’ve ever used. If I didn’t hate Microsoft even more I’d switch!
Looks like by removing the & symbol alltogether and just writing “amp;” it kinda works…
thx for the help
is there also something I should know about the color tag? I got <FONT COLOR=’#FFFFFF’><B>click me</B></FONT> and only the bold shows up… no white
The color tag works fine for me :-\
I used this…
myText=<FONT COLOR=’#FF0000’><B>Hello</B></FONT> World.
Worked fine :-\
ho well… Maybe MX doesn’t like white or something… I’m giving up… To much of a headache to try to figure out what should be so simple… thanks tho
White worked fine for me as well. Maybe it’s that whole Mac issue
overall htmlText is buggy, but you are experiencing bugs that aren’t even bugs… so I have no clue what to tell you :-\