It's been 2 hours that I'm trying to do this, I never thought it would be such a nightmare, and Google isn't helping me at all.
Does anybody know how can I define a CSS style for html hyperlinks inside a mx|Label
component such as a
, a:link
, a:hover
and a:active
?
(I can't use s|Label since it doesn't dispatch link
events...)
I tried everything (even really stupid ones), but am unable to find anything that actually works:
mx|Label.a {...}
mx|Label a {...}
mx|Label:a {...}
a {...}
mx|Label.a:link {...}
mx|Label a:link {...}
mx|Label:a:link {...}
a:link {...}
*|a {...}
*|a:link {...}
mx|a {...}
mx|a:link {...}
None of these are working, 开发者_JAVA技巧and I didn't found any help anywhere, nobody seems to have encountered this issue.
I'll be extremely grateful if someone could help me on this.
Thanks in advance.The only working solution I found is setting the styles manually using ActionScript :
var styleSheet:StyleSheet = new StyleSheet();
styleSheet.parseCSS( "a:hover { color: #6666ff; text-decoration: underline; } a { color: #0000ff; }" );
label.styleSheet = styleSheet;
...which I find pretty ugly (mixing .css file with hard-coded styles...)
Somebody got anything nicer?
精彩评论