# Flash and CSS problem

**URL:** <https://forum.kirupa.com/t/flash-and-css-problem/234914>\
**Category:** flash\
**Created:** [August 7, 2007, 5:30am UTC](https://forum.kirupa.com/t/flash-and-css-problem/234914 "2007-08-07T05:30:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [August 7, 2007, 5:30am UTC](https://forum.kirupa.com/t/flash-and-css-problem/234914/1 "2007-08-07T05:30:14Z")

</div>

OK,  
So Flash and CSS is a great thing… except there seems to be a big problem.

I have a style that I’m applying to one group of text. What I want, which I can’t seem to achieve, is getting two sets of “a:hover” tags to work.

Example:  
I have a paragraph,  
and I want some links to be pink and have an underline,  
and others to be green and have no underline.

Try as I will, I can’t get it going. It does change the color, but it doesnt recognise the second ‘textDecoration’ tag. Here’s what I’m trying…

[AS]var styles = new TextField.StyleSheet();  
styles.setStyle(“p”,{fontSize:‘18px’, marginLeft:‘0px’, leading:‘1px’, letterSpacing:‘0.0px’, color:’#666666’});  
styles.setStyle(“a:link”,{textDecoration:‘underline’, color:’#00FF00’});  
styles.setStyle(“a:hover”,{textDecoration:‘underline’, color:’#FF0000’});  
styles.setStyle(".otherLink",{fontSize:‘24px’, marginLeft:‘0px’, leading:‘1px’, color:’#00FFFF’});  
styles.setStyle(".otherLink:link",{textDecoration:‘none’, color:’#00FFFF’});  
styles.setStyle(".otherLink:hover",{textDecoration:‘none’, color:’#00FF00’});

myText = ‘\<p\>’;  
myText += ‘hello my name is \<a href=“blah”\>John\</a\>\<br\>’;  
myText += ‘go away \<a href=“blah” class=“otherLink”\>John\</a\>\<br\>\</p\>’;

col1.styleSheet = styles;  
col1.htmlText = myText;[/AS]

Any ideas anyone?
