Copy link to clipboard
Copied
In a pure AS3 project, I have a dynamic text field with 2 hyperlinks (onelink calling a URL via href, in the middle, one at the end to call a function to close-visible=false-the text field).
I can use <u> </u> tags with the <a>, but when I try to turn the hyperlinks blue (#0x0000FF) using <font color='#0x0000FF'>, nothing happens. The Adobe livedocs still show font tags including color for Flash and AIR.
For example, if I use the font tag, the following displays, item underlined and link working OK, but no color change.
textfield1.htmlText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <a href='event:xyz.com'><u><font color:'#0x0000FF'>xyz.com</font></u></a>incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
Does the font color tag still work or has it been depreciated?
Any help appreciated.
1 Correct answer
That does not appear to be a validly written html tag (nor color code) for the font. Try: <font color='#0000FF'>
Copy link to clipboard
Copied
That does not appear to be a validly written html tag (nor color code) for the font. Try: <font color='#0000FF'>
Copy link to clipboard
Copied
Hi Ned,
Thank you for this suggestion. I substituted <font color='#0000FF'> but got the same result. The text item (link) remains underlined, but no blue color.
I have been using text format for the text field, which has no special color for a link. Maybe this is over-riding the color choice? (But, doesn't seem to affect the underlining.)
If I use CSS, I would need to figure out how to change the text format properties into CSS.
var tfH2:TextFormat = new TextFormat();//current text format applied to this text field
tfH2.color = 0x000000;
tfH2.font = "Verdana";
tfH2.size = 18;
tfH2.bold = true;
tfH2.align = "left";
tfH2.leftMargin = 5;
//how to write this as myCSS.setStyle and properly tag the text with the <h1> etc.?
Copy link to clipboard
Copied
The solution I offered is valid wrt the information provided and the circumstances of your first posting and would solve that problem and does answer your question as far as the font tag goes... it still works when it is used properly.
If you have a new question regarding how to implement CSS you should post it separately.
Copy link to clipboard
Copied
Thank you, Ned.

