This content has been marked as final. Show 6 replies
are you using the htmlText property of your textfield to assign that string to your textfield?
Yup. Doin' it just like the example outta the help file.
Here is just one line of the html code I have in it:
<font face="Arial"><br /><font face="Arial_B"><p align="center">TRIAL THERAPY</p></font><p align="right"><a href="asfunction:showAnswer,trialTherapy"><font color="#0000FF"><u>VIEW ANSWER</u></font></a></p><br /><br />
Here is the function for loading the initial html file into the text field:
I'm using embedded fonts on the text field and calling an ActionScript function. //Code pulled straight out of the help file.
If you put a space or anything else if front of the <A> tag then it will only make the <A> tag clickable and not the empty space behind it.
<p align="right"> <a href="link">Link Text</a></p>
(hard to see but I put a space between <p align="right"> and <a href...
Thanks. I tried that. It doesn't seem to work. The whole line is a link.
I did, however, find that when I align left and do not put in a <br /> tag, the whole line to the right of the linked text is linked also. Putting in the break takes care of it though.
Weird. I tried your code in a dynamic textfield and got the results you were talking about. Then I tried with some text and then just a space and it seemed to fix it. Here is what I did, just so you can compare with what you have (I think that this is just a render bug with Flash but the work arounds are simple enough).
1. created a dynamic textfield on the stage in frame 1 and set the properties to the following:
set it to mulitple lines
selected the HTML button and deselected the Select Text button.
2. Attached the following AS to the frame:
test_txt.htmlText = "<p align=\"right\"> <a href=\"link\">Link</a></p>";
3. Tested the movie and on the word Link was clickable.
Also, I am using Flash 8 Pro on Windows (incase you are using something different).
Thanks for doing that. I came up with the same results. Since I'm loading everything from external files, I wanted to shy away from escaping all those characters. But, you definately helped me come up with a solution.
I took some of my text links and dropped them all into a test movie I had been working with and had accidently left the <title> tag in the head, which shows up in the html. Needless to say, the text "untitled document" did NOT have the hyperlink applied to it.
So I got to thinking, "What if I put text before and after the anchor tag." And sure enough. NO HYPER LINK on the new text. So then I got to thinking, "Hmm. Maybe I'll just put a character in before and after the hyperlink and set it's color to white so it won't show up."
Sure enough it worked. So, that's my fix/workaround. If you have a hyperlink that is aligned right and it shows up on the whole line, put a character before and after the hyperlink and make it's color the same as the background.
It worked, but HELLO ADOBE / FLASH TEAM!!! Please fix the bug and implement HTML 4.0 or above so we don't have to come up with these crazy workarounds, please.
Thanks everybody who helped out on this. Great community!