View Full Version : Another problem regarding loadVariable - html links
flatline damnation
May 17th, 2002, 01:59 PM
Hello again dear Flash mastas programmas,
Here's the situation:
I load a variable from a txt file.
The dynamic text box has html turned ON.
All characters are embeded.
Here's the problem:
In the txt file I have a text that contains an html link:
myVariable=Hello! This is my text! Click <a href=http://www.uachq.cjb.net>here</a> to visit my site!
However the swf displays everything up to "Click" ie before the link:
Hello! This is my text! Click
And that's it. I heard that Flash can recognize a simple html command like <a href> but this seems odd to me... Why isn't this working?
upuaut8
May 17th, 2002, 10:23 PM
ahh.. you've run into the deadly "escape" problem. Flash does recognize html links, but if you're taking things in from a txt file you need to escape some of the characters that you are using. I'll see if I can find out how to do that for you. It's not too tough.. it just requires you to remember a couple things when constructing the text files.
flatline damnation
May 18th, 2002, 05:08 AM
OK, I'll just wait here until you find that out...
Say, aren't you happen to talking about the html/httpencoders? like when instead of a space it'll say something like %20 and like for other character it'll be something like %4F or whatever?
Do you mean that I need to use such code to write the <> ?
upuaut8
May 18th, 2002, 06:37 AM
exactly that sir. You so smart.
I'm not sure where a list of those is, but they should be the same for Flash so if you know em, use em.
flatline damnation
May 18th, 2002, 10:26 AM
Yeah, I got a web-based encoder.
But it doesn't work. Still the same problem.
I switched the < and > by %3C and %3E, which are the corresponding codes but it still doesn't work...
What am I missing here? Am I suppose to use this code on the entire variable???
upuaut8
May 19th, 2002, 12:54 PM
hmm.. I'll have to play around a little before I can figure that out. I'll be working on such things tonight sometime.. maybe I'll have an answer by monday
ilyaslamasse
May 19th, 2002, 03:36 PM
Just in case : Are you sure the textbox is long enough ? Did you put the multiline on ?
pom 0]
flatline damnation
May 19th, 2002, 11:17 PM
Yes, I tested it with other text (that doesn't contain links) and everything works fine.
I know that the <a href> is the problem...
eyezberg
May 20th, 2002, 02:03 AM
In my humble opinion, all you need are " and" around your url; this:
&text_2.text=<a href="http://eyezberg.free.fr/tutoriaux/tutorFR.html"><font color="#ffffff" size="30">Acces direct aux tutoriaux</a> - Apprenez, copiez, modifiez, utilisez...</font>
works perfectly for me..(never mind the french words ;) )
upuaut8
May 20th, 2002, 03:44 AM
I'm finding that to be true also. Eyezberg is right.. you don't have to do that url encoding.
I'm not sure why you're isn't working. look for bugs in the a/s
flatline damnation
May 20th, 2002, 05:12 AM
Hey, it's working with the ""! Thanks Eyezberg!
Man, I gotto tell ya, Flash really handles with html in a very weird way!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.